I have created a file on a remote computer that I have ssh-ed into. I want to transfer the file back to the laptop I am using at the moment. I see that I am supposed to use the command:
scp username@server:/home/username/file_name /home/local-username/file-nameBut I'm not still not sure of what I should use for my laptop (which is a macbook). For "home' I guess I use the path that appears when I type pwd into my terminal when it opens?
I try this and I get the message:
No such file or directoryI know this is easy stuff but I've not done it before. Any help would be great. Thank you.
13 Answers
I would open another terminal on your laptop and do the scp from there, since you already know how to set that connection up.
scp username@remotecomputer:/path/to/file/you/want/to/copy where/to/put/file/on/laptopThe username@remotecomputer is the same string you used with ssh initially.
You can download in the current directory with a . :
cd # by default, goes to $HOME
scp me@host:/path/to/file .or in you HOME directly with :
scp me@host:/path/to/file ~ Simple :::
scp remoteusername@remoteIP:/path/of/file /Local/path/to/copy
scp -r remoteusername@remoteIP:/path/of/folder /Local/path/to/copy