0

I'm connected to a remote host via SSH, I've read the rsync page and I understood that to transfer a file from my local machine to the remote host I have to do

 rsync myHostname:path/to/file destination/path/on/remotehost

Now I retrieved my hostname with hostname , say it is AA, when I execute the above command I get:

ssh: AA: Name or service not known

What I am missing?

I'm using cygwin on W8.

1 Answer 1

0

The name service on the remote host does not know the AA (local host) name. In your rsync command you could use the IP address of the local host instead of the AA name.

If you prefer to use a host name rather than the IP address (e.g. AA) the DNS of the remote host must be updated so that the name AA can be translated to an IP address. Or if you have admin rights you can update the remote machine's hosts file. The hosts file entries take precedence over DNS lookup.

5
  • 've tried to use the IP I've found using ipconfig under the section "IPv4" section, but if I use this rsync freeze on "connecting to IP_Address". Am I picking the wrong one?
    – JTulip
    Commented Jun 18, 2014 at 11:18
  • Make sure you specify the user that the transfer to sent to in that case. rsync user@IP_ADDRESS/path /destination_path. If you still have problems, would doing the transfer from the local machine work for you?
    – suspectus
    Commented Jun 18, 2014 at 11:36
  • Yes, I'm already using user@IP, precisely my command is rsync -a user@IP:path/to/file /destinationPath. Unfortunately I'm not sure I can transfer from local to remote
    – JTulip
    Commented Jun 18, 2014 at 11:45
  • Two things - first is try -v (verbose) option in case that gives you some more indication of the error. Secondly, can user access rsync on the local machine? BTW would you be kind enough to upvote the answer ?(which has fixed your original problem I believe) thanks.
    – suspectus
    Commented Jun 18, 2014 at 11:58
  • -v does not change anything, and yes rsync can be accessed (in fact works locally)
    – JTulip
    Commented Jun 19, 2014 at 22:24

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .