cd ~/.ssh
ssh-keygen -t rsa
scp ./id_rsa.pub root@192.168.1.1:/root/.ssh/authorized_keys
本文介绍如何在本地生成SSH RSA密钥,并将公钥复制到远程服务器的authorized_keys文件中,实现免密码登录。通过在~/.ssh目录下运行ssh-keygen -t rsa生成密钥对,然后使用scp命令将id_rsa.pub文件发送到远程服务器的/root/.ssh目录。
cd ~/.ssh
ssh-keygen -t rsa
scp ./id_rsa.pub root@192.168.1.1:/root/.ssh/authorized_keys
转载于:https://www.cnblogs.com/dogharry/p/4701129.html
3984

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