needed link howto login with ssh no passwd for rsync

Discussion in 'Server Operation' started by GioMBG, Mar 31, 2012.

  1. GioMBG

    GioMBG New Member

    Hi All,
    pretty sure that here there is the tutorial I'm searchin' like:
    how to login from server to server without input passwd to use with cron and rsync
    thx
    GioMBG
     
  2. sjau

    sjau Local Meanie Moderator

    1.) On the client (the computer that wants to do the login into another computer) go to
    Code:
    cd ~/.ssh
    
    Check if there's is already a id_rsa.pub file

    If that file does not exist, create a public and private key by running this command:
    Code:
    ssh-keygen -t dsa
    
    2.) Copy the public key to the "remote" computer where you want to login:
    Code:
    ssh-copy-id -i .ssh/id_dsa.pub user@server
    
    user@server is the user on the remote computer where you want to login and server is the address or domain name of it

    3.) After successfully copying it with ssh-copy-id, you can just ssh to that remote computer:
    Code:
    ssh user@server
    
    and you won't be prompted again.

    And with rsync you'd just do:
    Code:
    rsync -[OPTIONS] -e "ssh" /path/to/local/directory user@server:/path/to/remote/directory
    
     

Share This Page