1、进入到远程目录,在目录节点下执行如下命令,生成rsa密钥
#生成rsa密钥,回车
ssh-keygen -t rsa
Enter file in which to save the key (/root/.ssh/id_rsa): /root/.ssh/id_rsa
Enter passphrase (empty for no passphrase): 回车就好,不用输入密码
#把公钥内容追加到认证文件中
cat /root/.ssh/id_rsa.pub >> /root/.ssh/authorized_keys
#授权
chmod 700 /root/.ssh
chmod 700 /root/.ssh/id_rsa
chmod 700 /root/.ssh/id_rsa.pub
chmod 600 authorized_keys
2、配置SSH Servers
填入私钥


点击测试
本文介绍了如何在Linux系统中生成RSA密钥对,包括使用`ssh-keygen`命令、保存私钥、创建公钥授权文件以及配置SSH服务器的过程,强调了权限设置的重要性。
1651

被折叠的 条评论
为什么被折叠?



