Results 1 to 3 of 3

Thread: Public key for ssh works fine, but rsync still askes for a password

  1. #1
    Join Date
    Jan 2007
    Location
    Amsterdam, Nederland
    Beans
    811
    Distro
    Ubuntu Development Release

    Question Public key for ssh works fine, but rsync still askes for a password

    Hello,

    I want to use rsync to sync a folder between two machines. Because I don't want to type in the password constantly I used this guide to create a key-pair, of which I put the public key in the destination machines ~/.ssh/authorized_keys

    This seems to work fine for ssh: I can login without typing a password. When I run the following command however, the remote machine still askes for the password.

    Code:
    sudo rsync --delete -azvv -e ssh '/home/kramer65/mylocalfolder/' user@othermachine:/home/pi/myremotefolder
    Does anybody know how this can be, and more importantly, how I can solve this? All tips are welcome!

  2. #2
    Join Date
    Apr 2008
    Location
    LOCATION=/dev/random
    Beans
    5,767
    Distro
    Ubuntu Development Release

    Re: Public key for ssh works fine, but rsync still askes for a password

    You're running your rsync command as the root user, whereas I'm guessing you set up ssh keys for your standard user.

    Try running rsync as your normal user, it should pick up on the ssh keys you have setup.
    Cheesemill

  3. #3
    Join Date
    Jan 2007
    Location
    Amsterdam, Nederland
    Beans
    811
    Distro
    Ubuntu Development Release

    Re: Public key for ssh works fine, but rsync still askes for a password

    That was indeed the problem!

    Why I ran it as root in the first place? I have no clue..

    Thanks a million!

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
  •