sshfs自动登录,生成密钥

ssh自动登录,生成密钥

ssh-keygen -t rsa 
cat .ssh/id_rsa.pub | ssh [remote_user]@[remote_server] "cat - >>.ssh/authorized_keys"

注:无密码ssh登录的基本原理是,在本地的root用户下,用ssh-keygen命令生成一对密钥,然后将其中的公钥,追加到远程服务器的authorized_keys文件中即可。密钥对只对本地的生成用户有效,其他用户需要重新生成并添加。

 超级简单。。。

猜你喜欢

转载自blog.csdn.net/weweeeeeeee/article/details/86592883