方法一:
1,卸載
[root@localhost ~]# rpm -qa|grep ssh
openssh-server-4.3p2-82.el5
openssh-clients-4.3p2-82.el5
openssh-4.3p2-82.el5
[root@localhost ~]# rpm -e openssh-server-4.3p2-82.el5
[root@localhost ~]# rpm -e openssh-clients-4.3p2-82.el5
[root@localhost ~]# rpm -e openssh-4.3p2-82.el5
[root@localhost ~]# service sshd status
2,安裝
[root@localhost ~]# yum install -y openssh-server
---------------------
作者:JAY_Cai
來源:CSDN
原文:https://blog.csdn.net/mrbigcai/article/details/78843207
版權聲明:本文爲博主原創文章,轉載請附上博文鏈接!
方法二:
1. 卸載
先查看openssh的相關包
[root@node51 ~]# rpm -qa openssh*
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
2. 安裝
[root@node51 ~]# yum install -y openssh-server-6.6.1p1-11.el7.x86_64
[root@node1 ~]# yum install -y openssh-clients-6.6.1p1-11.el7.x86_64
然後重新啓動ssh服務
[root@node51 ~]# service sshd start
這樣就可以了
---------------------
作者:__Sunny__
來源:CSDN
原文:https://blog.csdn.net/s_sunnyy/article/details/73870790
版權聲明:本文爲博主原創文章,轉載請附上博文鏈接!