Copy files from remote Ubuntu to local Mac

@ovc had it right, but there is a syntax error, and my edit got rejected for some reason. You need to have a colon between the user and filepath on the ubuntu side, and on the mac side you need to have the /Users/username/ portion in the filepath. Like so:

scp [email protected]:/path/to/myfile.txt /Users/Jamie/local/path/to/myfile.txt

This assumes you have private key authentication set up.


You're doing it the wrong way around. Simply use the scp command on the Mac, like this: scp [email protected]:/path/to/myfile.txt /local/path/to/myfile.txt. You may also just use FileZilla which is a graphical client. Connect to your Ubuntu with a URL like sftp://192.168.1.111, of course you need to use the valid IP address.


Excellent answers above. Additionally, if you need to use a certificate for authentication, you can use the -i flag.

scp -i /path/to/cert [email protected]:/path/to/myfile.txt /Users/Jamie/local/path/to/myfile.txt

Tags:

Ssh

Scp

Mac