PDA

View Full Version : [ubuntu] Download file from remote machine with SCP



ugly_peter
April 21st, 2009, 06:59 AM
How can you download a file from a remote host using scp. I am trying

scp remotehost:file .

But this gives me an error: "standard input: Invalid argument"

Walter Melon
April 21st, 2009, 07:58 AM
How can you download a file from a remote host using scp. I am trying

scp remotehost:file .

But this gives me an error: "standard input: Invalid argument"

you have to specify a target directory. so type
scp user@host:file ~/Desktop/file

mattj7
January 8th, 2013, 08:46 PM
I see this thread is 4 years old, but I'll post anyway lol. I was wondering how to do this when downloading from ubuntu to windows. For example, I'm putty'd into my ubuntu box on my windows machine, trying to download a file, and when I type:

scp user@host:/home/user/file "C:\Users\User1\Desktop\file"

it says "could not resolve hostname C: name or service not known"
Clearly this is because of the windows style directory path, but how do I make it compatible?

oldos2er
January 8th, 2013, 09:37 PM
If a post is older than a year or so and hasn't had a new reply in that time, instead of replying to it, create a new thread. In the software world, a lot can change in a very short time, and doing things this way makes it more likely that you will find the best information. You may link to the original discussion in the new thread if you think it may be helpful.