- wget http://pkgs.repoforge.org/rpmforge-release-0.5.2-2.el5.rf.x86_64.rpm
- wget http://apt.sw.be/RPM-GPG-KEY.dag.txt
- rpm -K rpmforge-release-0.5.2-2.el6.rf.x86_64.rpm
- rpm -ivh rpmforge-release-0.5.2-2.el6.rf.x86_64.rpm
-
vi /etc/yum.repos.d/rpmforge.repo
add “priority=3″ or other right priority number after “enabled = 1″ - yum repolist
- yum install keychain
- ssh-keygen -t dsa
- chmod 755 .ssh
- scp ~/.ssh/id_dsa.pub user@remotehost:.ssh/authorized_keys
Or:
cat ~/.ssh/id_dsa.pub | ssh hadoopuser@remotehost "cat - >> ~/.ssh/authorized_keys" - chmod 600 ~/.ssh/authorized_keys
- vi .bash_profile
add following commands:
/usr/bin/keychain -q $HOME/.ssh/id_dsa
source $HOME/.keychain/$HOSTNAME-sh - Logout and login. password for key files is asked and will be asked at first time login only. or run command source .bash_profile
- run ssh among servers without being asked for password
Saturday, April 7, 2012
configure passphraseless SSH login among CentOS servers
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment