网络通信 频道

无需密码的ssh

我在俩太机器上建立了等效性用户,但是用等效性用户访问对方的时候 还需要密码,为什么啊?
我的配置如下:
.cat /etc/hosts
#add by wangry 20051226
192.168.10.71 db1
192.168.10.73 db3
192.168.100.71 db1-priv
192.168.100.73 db3-priv
192.168.10.171 db1-vip
192.168.10.173 db3-vip
在db1上:
mkdir ~/.ssh
chmod 755 ~/.ssh
/usr/bin/ssh-keygen -t rsa
/usr/bin/ssh-keygen -t dsa
cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys
cat ~/.ssh/id_dsa.pub >> ~/.ssh/authorized_keys

ssh oracle@db3 cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys
ssh oracle@db3 cat ~/.ssh/id_dsa.pub >> ~/.ssh/authorized_keys
在db3上:
mkdir ~/.ssh
chmod 755 ~/.ssh
/usr/bin/ssh-keygen -t rsa
/usr/bin/ssh-keygen -t dsa
cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys
cat ~/.ssh/id_dsa.pub >> ~/.ssh/authorized_keys

ssh oracle@db1 cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys
ssh oracle@db1 cat ~/.ssh/id_dsa.pub >> ~/.ssh/authorized_keys

测试:
ssh db3 date :
[oracle@db1 ~]$ ssh db3 date
就不会出现
oracle@db3''s password: (居然还要密码)

0
相关文章