Linux远程ssh免密码

    xiaoxiao2025-07-11  5

    A和B两台服务器

    1、在A运行ssh-keygen -t rsa 一直回车,在/root/.ssh 生成id_rsa和id_rsa.pub。

    2、使用ssh-copy-id -i /root/.ssh/id_rsa.pub root@BIP 把A的id_rsa.pub远程负责到B的.ssh中并且命名为authorized_keys 最后赋一下权限chmod 644 authorized_keys 和 chmod 700 -R .ssh。

    3、然后就可以了。

    转载请注明原文地址: https://ju.6miu.com/read-1300601.html
    最新回复(0)