1.安装SSH

sudo apt-get install openssh-server

Ubuntu配置SSH

 

2.启动服务

sudo /etc/init.d/ssh start

Ubuntu配置SSH

 

3. 查看是否正确启动

ps -e | grep ssh

Ubuntu配置SSH

 

4. 生成公钥和私钥

ssh-****** -t rsa

Ubuntu配置SSH

 

5. 查看公钥和私钥

Ubuntu配置SSH

 

6.将自己的公钥追加到authorized_keys中

cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys

Ubuntu配置SSH

 

7.登录SSH(这里就不再需要输入密码了)

ssh localhost

Ubuntu配置SSH
 
8.退出exit

Ubuntu配置SSH
  
 
 

 

 


 
 

相关文章:

  • 2022-01-30
  • 2021-12-05
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-06-01
  • 2022-12-23
  • 2021-07-15
猜你喜欢
  • 2021-04-01
  • 2022-01-24
  • 2021-10-26
  • 2021-09-21
  • 2022-12-23
  • 2021-08-31
相关资源
相似解决方案