1.卸载openssh

执行rpm-qaopenssh* 查看是否已经安装过了。

 

[[email protected] ~]# 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

 

依次卸载:

[[email protected] ~]# yum remove openssh-server-6.6.1p1-11.el7.x86_64

[[email protected] ~]# yum remove openssh-clients-6.6.1p1-11.el7.x86_64

[[email protected] ~]# 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
centos安装、卸载openssh

把上图的PermitRootLogin,RSAAuthentication,PubkeyAuthentication的设置打开。

 

执行 systemctlstart sshd.service 启动服务

设置开机自启动:systemctl enable sshd.service

 

 

参考:https://www.cnblogs.com/liuhouhou/p/8975812.html

相关文章:

  • 2022-02-07
  • 2022-01-14
  • 2021-11-30
  • 2022-01-15
  • 2021-12-04
  • 2021-12-13
  • 2021-12-13
猜你喜欢
  • 2021-09-07
  • 2021-11-15
  • 2022-01-06
  • 2022-01-31
  • 2022-12-23
  • 2021-05-18
相关资源
相似解决方案