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!
 


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
 
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.


root@server/folder# scp goat.txt /home/user

(no error but no file there)



root@server/folder# scp goat.txt /home/user/Desktop/

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



root@server/folder# scp goat.txt /home/user/Downloads/

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



root@server/folder# scp goat.txt /home/user/Downloads/goat.txt

cp: failed to access '/home/user/Downloads/qqq.txt': Not a directory
 
I assume you have SSH installed/enabled to manage your VPS.

Just use SFTP. Filezilla can handle it.
 
It's like this:
Code:
scp source-filename username@hostname:/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
 

Members online


Latest posts

Top