Saturday, 9 October 2021

How to copy files from Ubuntu to Mac

If remote login is not enabled on Mac, SSH connection will fail:

~/Videos$ scp -r MyDir/ user@
ssh: connect to host port 22: Connection refused
lost connection

We need to enable remote login on Mac (System Preferences >>  Sharing):

~/Videos$ scp -r MyDiruser@
The authenticity of host ' (' can't be established.
ECDSA key fingerprint is SHA256:fvlF0KH/l1N/fHmg4etTM/OR9DJYl1mnzD2iD43R+j5.
Are you sure you want to continue connecting (yes/no/[fingerprint])? yes
Warning: Permanently added '' (ECDSA) to the list of known hosts.
file1.m4v         100%  137MB   1.6MB/s   01:28    
file2.m4v         100%  151MB   1.5MB/s   01:40    

Files are copied to /Users/user/Movies/MyDir/.