ubuntu安装ssh

  • 切换到root用户
su -
  • 在root的根目录下update一下
apt-get update
  • 安装ssh server
apt-get install openssh-server
  • 查看进程
ps -e | grep ssh
  • 如果只看到sshd没有ssh-agent
eval  ssh-agent
WechatIMG6.jpeg
  • 重启ssh
/etc/init.d/ssh restart
  • 远程连接
ssh  用户@IP地址

![WechatIMG8.jpeg](http://upload-images.jianshu.io/upload_images/5573343-fd159a0104a7c7ca.jpeg?imageMogr2/auto-

  • 如果出现Agent admitted failure to sign using the key
ssh-add   ~/.ssh/id_rsa 

orient/strip%7CimageView2/2/w/1240)

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容