ubuntu18.04安装openssh服务实现xshell访问

1.更新源列表

  • 登录终端窗口,输入: sudo apt-get update
    ubuntu18.04安装openssh服务实现xshell访问

2.安装openssh-client :sudo apt-get install openssh-client

ubuntu18.04安装openssh服务实现xshell访问

3.安装openssh-server: sudo apt-get install openssh-server

ubuntu18.04安装openssh服务实现xshell访问

4.启动ssh服务:sudo service ssh start

ubuntu18.04安装openssh服务实现xshell访问

5.验证ssh服务是否启动成功:sudo ps -aux -ef | grep ssh

ubuntu18.04安装openssh服务实现xshell访问

6.使用xshell链接测试

6.1在windows系统上,下载xshell

ubuntu18.04安装openssh服务实现xshell访问

6.2安装装后启动

ubuntu18.04安装openssh服务实现xshell访问

6.3新建一个连接

ubuntu18.04安装openssh服务实现xshell访问

6.4用新建连接登录

ubuntu18.04安装openssh服务实现xshell访问
ubuntu18.04安装openssh服务实现xshell访问

  • 如果使用xshell连接linux之后出现/usr/bin/xauth: error in locking authority file /home/*/.Xauthority,退出xshell ,重新登录一次即可.