ssh免密登录及去掉提示

A连B

1.生成公钥和私钥    ssh-keygen
2.复制公钥到需要免密登录的服务器上  ssh-copy-id root@192.168.25.175

A连A

2.复制公钥到本机上  ssh-copy-id root@本机ip

问题:

免密登录遇到Are you sure you want to continue connecting (yes/no)?的提示,很烦人,如何去掉?

解决:修改/etc/ssh/ssh_config将其中的# StrictHostKeyChecking ask 改成 StrictHostKeyChecking no

posted @ 2018-01-06 23:56  懒人写博客  阅读(2443)  评论(0编辑  收藏  举报