1. 在本地生成公钥, 

  ssh-keygen -t RSA -b 800     

Ubuntu ssh-keygen 生成公钥并添加到远程服务器上

 

2. cd /root/.ssh

3. ssh-copy-id -i  id_rsa.pub 远程服务器IP

Ubuntu ssh-keygen 生成公钥并添加到远程服务器上

这一步需要输入远程服务器的root密码

4. 测试登录远程服务器

Ubuntu ssh-keygen 生成公钥并添加到远程服务器上

 

搞定 !! 

 

相关文章:

  • 2021-12-03
  • 2021-08-24
  • 2022-12-23
猜你喜欢
  • 2022-02-11
  • 2022-12-23
  • 2022-12-23
  • 2021-08-24
  • 2021-04-18
相关资源
相似解决方案