【CentOS】检查系统是否安装OpenSSH

# CentOS7 远程联机

哔哩哔哩 萌狼蓝天

博客:https://mllt.cc

微信公众号:萌狼蓝天

检查与安装配置OpenSSH

[CentOS7]检查系统是否安装OpenSSH

yum -q list openssh-server

如果没有安装可使用如下命令安装

yum -y install oepnssh-server

[CentOS7]检查系统是否启动OpenSSH服务器

systemctl status sshd

image-20210906095949556

如果OpenSSH服务器没有启动,则手动启动

systemctl start sshd

[CentOS7]设置sshd开机自动启动

systemctl enable sshd

如果设置sshd启动后,sshd状态仍没有启动,检查防火墙是否阻止了ssh服务

firewall-cmd --list-service

image-20210906100442155

出现该结果则是没问题的

如果没有出现该结果,则需要你自己去添加ssh服务(下面这个是永久加入的命令,不想永久加入的话,最后不写permanent就可以了)

firewall-cmd --add-service ssh permanent

安装xshell

[Windows]搜索xshell,进入官网

Free for Home/School - Xshell and Xftp Free Licensing (netsarang.com)

image-20210906102015467

image-20210906102046114

你将会收到一封邮件

点击邮件中的下载链接即可进行下载,下载后完成安装即可。

配置与连接CentOS7

[Windows]打开xshell

image-20210906102214362

不知道CentOS IP地址的,在CentOS终端中输入ifconfig

image-20210906100834465

image-20210906101513310

image-20210906101611330

image-20210906101623760

xshell中出现如下内容,则为连接成功

image-20210906102315699

posted @ 2021-10-08 16:38  萌狼蓝天  阅读(936)  评论(0编辑  收藏  举报