centos安装、卸载openssh
1.卸载openssh
执行rpm-qaopenssh* 查看是否已经安装过了。
[root@node51 ~]# rpm-qaopenssh*
openssh-server-6.6.1p1-11.el7.x86_64
openssh-6.6.1p1-11.el7.x86_64
openssh-clients-6.6.1p1-11.el7.x86_64
依次卸载:
[root@node51 ~]# yum remove openssh-server-6.6.1p1-11.el7.x86_64
[root@node51 ~]# yum remove openssh-clients-6.6.1p1-11.el7.x86_64
[root@node51 ~]# yum remove openssh-6.6.1p1-11.el7.x86_64、
或者使用:yum remove openssh-* 全部卸载掉
2.安装openssh
yum install -y openssl openssh-server
用vim打开配置文件/etc/ssh/sshd_config
把上图的PermitRootLogin,RSAAuthentication,PubkeyAuthentication的设置打开。
执行 systemctlstart sshd.service 启动服务
设置开机自启动:systemctl enable sshd.service
相关推荐
airfish000 2020-09-11
LiHansiyuan 2020-06-07
xiangqiao 2020-05-17
hulao 2020-05-10
returnspace 2020-03-06
colin00 2020-02-03
caspertian 2020-01-02
iammrziran 2013-04-14
mlcml 2019-12-26
Macan生活点滴 2013-08-12
ConquerALL 2013-09-13
heyw 2015-04-15
风吹草动 2019-11-10
iammrziran 2015-07-08