Ubuntu18.04搭建ssh服务器

Ubuntu安装后默认只有ssh客户端,即只能在Ubuntu内去连接其他ssh服务器,若想实现我们的Ubuntu被其他主机远程连接,则需要自己去安装ssh服务端。

安装

进入Ubuntu18.04,打开终端,su进入root,输入命令:

sudo apt install openssh-server

执行结果:

在这里插入图片描述

重启ssh服务器

命令:

/etc/init.d/ssh restart

在这里插入图片描述

service sshd restart

修改配置文件

vim /etc/ssh/sshd_config

连接测试

连接工具很多,本文用secureCRT。

在这里插入图片描述在这里插入图片描述在这里插入图片描述

ww
在这里插入图片描述
在这里插入图片描述
Ok,可以使用了

更多Linux信息,请关注 一口Linux

猜你喜欢

转载自blog.csdn.net/daocaokafei/article/details/108261429