参考网址:
[Xshell连接不上Ubuntu解决方式](https://blog.csdn.net/p397226804/article/details/78574226)
首先,我们想在Windows下,远程控制Linux,我们得确保Linux允许Windows访问才行。
```
ps -e | grep ssh
```
如果此时只有1721?是无法被访问的,我们需要install openssh-server,命令如下:
```
sudo apt-get install openssh-server
```
以下是Linux端命令输出内容截图:
![](https://upload-images.jianshu.io/upload_images/2789632-fbaa995dd095a6e9.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)
![](https://upload-images.jianshu.io/upload_images/2789632-5a1b7f6b23542102.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)
安装好了之后,我们再执行查询命令,可以明显看出多了26337? sshd
![](https://upload-images.jianshu.io/upload_images/2789632-5f279b66a3951986.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)
以下是Shell的使用方式, 新建连接,输入Linux的IP地址。然后一步一步走下去,就可以远程控制Linux系统啦~
至于如何查看Linux的IP地址,执行ifconfig命令即可。如果此时无法使用ifconfig命令,需要install net-tools, 命令:sudo apt install net-tools。
可参考文章:[Linux 学习- Ubuntu 查看本机IP](https://www.jianshu.com/p/8697193e0570)
![](https://upload-images.jianshu.io/upload_images/2789632-2ce9249d696fc430.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)
![](https://upload-images.jianshu.io/upload_images/2789632-77dfe353c4604c99.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)
![](https://upload-images.jianshu.io/upload_images/2789632-996b6446df8eb803.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)
![](https://upload-images.jianshu.io/upload_images/2789632-619e5d246aa46752.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)
![](https://upload-images.jianshu.io/upload_images/2789632-760d7740371d730c.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)
![](https://upload-images.jianshu.io/upload_images/2789632-64123dc8464cb87e.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)