Results 1 to 4 of 4

Thread: rsync with ssh - asking for password after keygen

  1. #1
    Join Date
    Nov 2008
    Location
    Southern California, USA
    Beans
    131

    Unhappy rsync with ssh - asking for password after keygen

    ive set up passwordless ssh by running ssh-keygen , then swapped keys using ssh-copy-id . i can login without being asked for a password if i just type in ssh user@remote.com , but when running this rsync command i get prompted for a password on the remote machine. im transferring data from a remote machine to a local computer, and im running rsync from the local machine.

    sudo rsync --delete --progress -azvv -e ssh desktop@remote.com:/home/remote/Documents/ /home/local/Documents/

    could it be that when i created the keys i didnt add these options? and thats whats causing the problems? ssh-keygen -t rsa
    Last edited by kpholmes; October 3rd, 2012 at 06:49 AM.

  2. #2
    Join Date
    Jul 2011
    Beans
    3,037
    Distro
    Ubuntu 12.04 Precise Pangolin

  3. #3
    Join Date
    Sep 2006
    Beans
    7,624
    Distro
    Lubuntu Development Release

    Re: rsync with ssh - asking for password after keygen

    You probably have to specify the key in rsync, too.

    Code:
    sudo rsync --delete --progress  -azvv -e 'ssh -i /home/desktop/.ssh/key_rsa' desktop@remote.com:/home/remote/Documents/ /home/local/Documents/
    Obviously fill in the right path for your own key.

  4. #4
    Join Date
    Nov 2008
    Location
    Lleida, Spain
    Beans
    1,157
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: rsync with ssh - asking for password after keygen

    Quote Originally Posted by kpholmes View Post
    ive set up passwordless ssh by running ssh-keygen , then swapped keys using ssh-copy-id . i can login without being asked for a password if i just type in ssh user@remote.com , but when running this rsync command i get prompted for a password on the remote machine. im transferring data from a remote machine to a local computer, and im running rsync from the local machine.

    sudo rsync --delete --progress -azvv -e ssh desktop@remote.com:/home/remote/Documents/ /home/local/Documents/

    could it be that when i created the keys i didnt add these options? and thats whats causing the problems? ssh-keygen -t rsa
    If you're running rsync with sudo, ssh keys should be installed in the root ssh folder /root/.ssh/

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •