MacOS – user-name@dest-host for MACbookpro

macosterminal

I have a directory at a unix machine which I want to copy to my macbook. I login to unix machine using a VPN connection and then try to copy the directory using the following standard command

scp [[user-name@]source-host:]source-file-path [[user-name@]dest-host:][dest-file-path]

my problem is that i cannot figure out the [user-name@]dest-host:] part for my macbook. When i go to my mac system preferences i see two options

  1. Computer name : xxx.local
  2. File Sharing : on
    Other users can access shared folders on this computer at afp://xxx.xxx.x.xx/

I have also selected remote login option in service.
I would appreciate if someone can guide me about how to find out [user-name@]dest-host:] for mac os x version 10.7.5

Best Answer

You don't need to specify any host info for your local Mac.

Open a terminal in a folder of choice, and then execute the SCP command - then the Remote files will be copied to this local folder.

See more here: http://www.folkstalk.com/2012/07/scp-command-examples-linux-unix.html

3. Copy files from remote host to local server.

This operation is used when taking backup of the files in remote server.

scp user@remotehost:/usr/backup/oracle_backup.dat .