I am looking for projects to work on
Please contact with me at!

Saturday, April 7, 2012

configure passphraseless SSH login among CentOS servers

  1. wget
  2. wget
  3. rpm -K rpmforge-release-0.5.2-2.el6.rf.x86_64.rpm
  4. rpm -ivh rpmforge-release-0.5.2-2.el6.rf.x86_64.rpm
  5. vi /etc/yum.repos.d/rpmforge.repo
    add “priority=3″ or other right priority number after “enabled = 1″
  6. yum repolist
  7. yum install keychain
  8. ssh-keygen -t dsa
  9. chmod 755 .ssh
  10. scp ~/.ssh/ user@remotehost:.ssh/authorized_keys
    cat ~/.ssh/ | ssh hadoopuser@remotehost "cat - >> ~/.ssh/authorized_keys"
  11. chmod 600 ~/.ssh/authorized_keys
  12. vi .bash_profile
    add following commands:
    /usr/bin/keychain -q $HOME/.ssh/id_dsa
    source $HOME/.keychain/$HOSTNAME-sh
  13. Logout and login. password for key files is asked and will be asked at first time login only. or run command source .bash_profile 
  14. run ssh among servers without being asked for password

No comments:

Post a Comment