使用Xshell 5工具连接Ubuntu18服务器

1.安装SSH

打开终端窗口,输入命令

sudo apt-get install openssh-server

 等待安装完成

2.查看SSH服务是否启动

输入命令

sudo ps -e |grep ssh  

 看到SSHD则说明服务已经启动,如下图

如果没有启动,输入命令

sudo service ssh start

3.修改配置文件

输入命令

sudo gedit /etc/ssh/sshd_config

把配置文件中的"PermitRootLogin without-password"加一个"#"号注释掉,再增加一句"PermitRootLogin yes",保存文件,如下图。这样做是为了允许root用户登录。

或者直接把下面的内容复制到配置文件中

------------------------------内 容------------------------------
# Authentication:
LoginGraceTime 120
#PermitRootLogin without-password
PermitRootLogin yes
StrictModes yes
------------------------------内 容------------------------------

4.重新启动

/etc/init.d/ssh restart

5.查看ip地址  

ifconfig

6.安装Xshell 5

7.连接

root用户

猜你喜欢

转载自www.cnblogs.com/jcjssl/p/9375156.html