centos7搭建ssl访问的内网服务器openssh-sever

搭建内网服务器:

服务器端需要的工作:

1.安葬openssh-sever服务器:

yum install openssh-server
2.配置ssh

 (1)在etc/ssh/sshd_config配置,打开端口号22或者自己修改端口

vim sshd_config
centos7搭建ssl访问的内网服务器openssh-sever_第1张图片

(2)在防火墙里添加(1)中设置的端口为允许访问端口(如果用默认端口则直接跳过此步)9000是我第一步设置的端口号

[root@localhost ssh]# systemctl start firewalld
[root@localhost ssh]# systemctl enable firewalld
[root@localhost ssh]# firewall-cmd --zone=public --add-port=9000/tcp --permanent

centos7搭建ssl访问的内网服务器openssh-sever_第2张图片

(3)启动ssh服务器

systemctl restart sshd.service



注意:

修改完端口号要在防火墙里添加允许访问的端口号,如果不在防火墙里添加端口号则关闭防火墙(systemctl stop firewalld)后其他内网里的设备才可以通过相关ssh客户端访问,我用的是xshell。


参考资料:http://blog.sina.com.cn/s/blog_7e2140b70102v95s.html

                     https://segmentfault.com/a/1190000003931716

                     http://www.centoscn.com/CentOS/help/2015/0208/4667.html




你可能感兴趣的:(操作系统,linux)