A:192.168.0.1
B:192.168.0.2
实现B机无需密码ssh到A机
B操作
/usr/bin/ssh-keygen -t rsa
在/root/.ssh/下面生成两个文件
id_dsa(私钥)
id_dsa.pub(公钥)
scp /root/.ssh/id_dsa.pub [email protected]:/root/
A操作
cat /root/id_rsa.pub >> /root/.ssh/authorized_keys
A:192.168.0.1
B:192.168.0.2
实现B机无需密码ssh到A机
B操作
/usr/bin/ssh-keygen -t rsa
在/root/.ssh/下面生成两个文件
id_dsa(私钥)
id_dsa.pub(公钥)
scp /root/.ssh/id_dsa.pub [email protected]:/root/
A操作
cat /root/id_rsa.pub >> /root/.ssh/authorized_keys