Is there a way to transfer files directly from a Mac to another using only Terminal? Perhaps using SSH?

link|improve this question

feedback

3 Answers

up vote 7 down vote accepted

Yes, you can use scp , which basically cp over ssh. It can work either way also, so:

scp ~/Document/Localfile remoteuser@remotemachine:~/Desktop

or

scp remoteuser@remotemachine:~/Destkop/remotefile ~/Desktop

The first command would copy a file to the remote machine, the second would copy a file from the remote to the local. The syntax is <user>@<machine or ip>:<file> you can do a man scp for more switches and options

link|improve this answer
Thanks! That worked! – JShoe May 19 '11 at 20:34
No problem, please remember Gordon Davisson info below wrt Mac Metadata and the -E option – Ryan Gibbons May 19 '11 at 20:45
feedback

The scp command on Linux is how you do file transfers using SSH

link|improve this answer
4  
scp works great on Macs with one caveat: if you want it to copy Mac-specific file metadata (resource forks, extended attributes, etc), be sure to use its -E option. – Gordon Davisson May 19 '11 at 20:17
feedback

scp is the command you want. You need to have SSH logins enabled on the destination computer, and know the username and password for the destination computer.

scp file.txt user@destination-computer:/Users/user/Documents/file.txt
link|improve this answer
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.