download a file from VPS

LinuxLegends

New Member
Joined
Jul 18, 2022
Messages
13
Reaction score
1
Credits
135
I'm back with another noob question that has become a struggle. I appreciate all the help guys, I'm sorry in advance

so I'm looking to download a .txt file from my VPS to the local PC. (both local PC & VPS are Debian)

I can't use wget or curl because those are for external websites right? So I'd use scp. However, this command seems to be having trouble finding the local folder.

So like I'd "cd" into the right VPS folder, then:
Code:
scp goat.txt /home/Downloads
And it will spit back Downloads not found. But if I do just /home/ then there's no error but it isn't there!
 


wizardfromoz

Administrator
Staff member
Gold Supporter
Joined
Apr 30, 2017
Messages
7,513
Reaction score
6,355
Credits
26,582
It should be

Code:
/home/your-username/Downloads

so for me it is

/home/chris/Downloads

Try that.

Moving this to General Linux as Getting Started is for installation questions.

Cheers

Chris Turner
wizardfromoz
 
OP
LinuxLegends

LinuxLegends

New Member
Joined
Jul 18, 2022
Messages
13
Reaction score
1
Credits
135
It should be

Code:
/home/your-username/Downloads

so for me it is

/home/chris/Downloads

Try that.

Moving this to General Linux as Getting Started is for installation questions.

Cheers

Chris Turner
wizardfromoz
No dice.


[email protected]/folder# scp goat.txt /home/user

(no error but no file there)



[email protected]/folder# scp goat.txt /home/user/Desktop/

cp: failed to access '/home/user/Desktop/ Not a directory



[email protected]/folder# scp goat.txt /home/user/Downloads/

cp: failed to access '/home/user/Downloads/ Not a directory



[email protected]/folder# scp goat.txt /home/user/Downloads/goat.txt

cp: failed to access '/home/user/Downloads/qqq.txt': Not a directory
 

f33dm3bits

Gold Member
Gold Supporter
Joined
Dec 11, 2019
Messages
4,900
Reaction score
3,527
Credits
35,667
It's like this:
Code:
scp source-filename usernam[email protected]:/home/user/Downloads
source-filename being the file on your vps and Downloads being the directory on the other system
where you are wanting to copy your file to. If you want to copy over a directory use -r. You may also want to look at rsync.
Code:
man rsync
 
$100 Digital Ocean Credit
Get a free VM to test out Linux!

Linux.org Hosting Donations
Consider making a donation

Members online


Top