Copying a file from server to computer via SSH

We copy the file or files from our remote server to the local computer via the command line and the SSH protocol.

For convenience (and security), you should get rid of the password and transfer the connection to the server via SSH public keys.

Copy the file on Unix systems and on Mac OS:

scp root@ /Users/ploshadka/Downloads/

Copy the directory along with the contents:

scp -r root@ /Users/ploshadka/Downloads

Preview which files are inside, and then copy with the first command above:

ssh root@ ls /some/directory

Similar Posts

Leave a Reply