Mac OS X,  Mac OS X Server,  Mac Security

Use scp To Connect To A Remote Mac And Copy A File

Use scp to connect to a remote host and copy a file. To do so, use the -E option, followed by the source file, in this case the path for that file is ~/elcap.dmg. Then do the username followed by a : and then the password. Those credentials are then being used on the server defined by the @ symbol and then the fqdn of the host, all together here being krypted:mrrobot@imaging.krypted.com where krypted is the username, mrrobot is the password and imaging.krypted.com is the hostname of the target box running ssh. Then just list the path and filename of the target. In this case, it would be /Users/krypted/Desktop/elcap.dmg:

scp -E ~/elcap.dmg krypted:mrrobot@imaging.krypted.com:/Users/krypted/Desktop/elcap.dmg