ssh相互访问不用密码

ssh相互访问不用密码

    操作过程如下:

    举例:从A机访问B机不用密码。

    A:上面执行

    #ssh-keygen -t rsa

    生成两个文件:/root/.ssh/id_rsa.pub公钥和/root/.ssh/id_rsa

    私钥。

    #chmod 755 /root/.ssh/

    #scp /root/.ssh/id_rsa.pub B:/root/.ssh/authorized_keys

    然后A机就可以不用密码访问B了。

转载于:https://www.cnblogs.com/licheng/archive/2010/12/29/1920917.html

猜你喜欢

转载自blog.csdn.net/weixin_33831196/article/details/93801097
今日推荐