1 下载Xshell
XShell官方下载地址
打开XSHELL官方下载地址,我们可以选择【家庭和学校用户的免费许可证】,输入邮箱之后即可获得下载链接

安装非常简单,跟着提示进行即可。
2 连接ubuntu
2.1 查看ubuntu的ip地址
输入命令查看ip地址
ifconfig

刚开始可能会提示还没有这个命令,我们可以根据下面的地址进行安装:
sudo apt install net-tools
注意:输入上述命令的时候,可能会报错

这时候,我们直接删除 /var/lib/dpkg/lock即可

然后重新进行安装net-tools,可以看到安装成功

然后查看ubuntu的ip地址,这里的 192.168.168.128 即是

最重要的一步,就是需要安装openssh-server,如果不安装,xshell是无法连接ubuntu的:
sudo apt-get install openssh-server

2.2 连接ubuntu
打开xshell工具,选择新建会话,输入会话名称,以及我们查到的ubuntu的ip地址

接着选择用户身份验证,输入用户名和密码即可。然后点击确定完成连接
