#创建密钥 & 赋予自己
ssh-keygen -t dsa -P '' -f ~/.ssh/id_dsa
cat ~/.ssh/id_dsa.pub >> ~/.ssh/authorized_keys
chmod 0600 ~/.ssh/authorized_keys
#本地测试
ssh localhost
#把自己的公钥放到其他Linux的 ~/.ssh/authorized_keys中
#连接其他服务器测试
ssh 192.168.40.1
Linux直接创建SSH无密码连接
最新推荐文章于 2024-07-20 18:38:43 发布