What is the terminal command to retrieve files from a remote server using ssh in Mac OS X?

11

3

I normally ssh into my remote server in order to administrate my files using terminal for Mac OS X.

I don't understand how I retrieve (download) files from the server to my local computer, or send files from my local computer to the server (upload).

significance

Posted 2010-04-09T14:10:22.887

Reputation: 243

Answers

22

To grab a file over SSH:

$ scp host:/path/to/file local_file

To send a file:

$ scp local_file host:/path/to/file

scp is "secure copy", a copy utility that sends files over an SSH connection.

mipadi

Posted 2010-04-09T14:10:22.887

Reputation: 3 980

there's also sftp, which is kind of like ftp, but uses ssh as the actual means of communication. – Isaac – 2010-04-10T18:37:55.560