ssh公钥认证

Standard

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

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.