热门标签 | HotTags
当前位置:  开发笔记 > 运维 > 正文

centos出现ssh登录失败怎么办

centos出现ssh登录失败的解决方法:1、重新安装openssh-server;2、生成密钥;3、编辑配置文件sshd_config,添加【​PubkeyAuthenticationyes】配置;4、重新启动sshd。

解决方法如下:

1、卸载重新安装

[root@cent ~]# yum -y remove openssh-server
[root@cent ~]# yum -y install openssh-server

2、生成密钥(可选)

[root@cent ~]# sshd-keygen

3、修改sshd_config配置文件

[root@cent ~]# vim /etc/ssh/sshd_config
# 添加以下内容至文件末尾处 :wq
PubkeyAuthentication yes

4、重新启动sshd

[root@cent ~]# systemctl restart sshd.service

推荐教程:centos教程

以上就是centos出现ssh登录失败怎么办的详细内容,更多请关注其它相关文章!


推荐阅读
author-avatar
手机用户2502858341
这个家伙很懒,什么也没留下!
PHP1.CN | 中国最专业的PHP中文社区 | DevBox开发工具箱 | json解析格式化 |PHP资讯 | PHP教程 | 数据库技术 | 服务器技术 | 前端开发技术 | PHP框架 | 开发工具 | 在线工具
Copyright © 1998 - 2020 PHP1.CN. All Rights Reserved | 京公网安备 11010802041100号 | 京ICP备19059560号-4 | PHP1.CN 第一PHP社区 版权所有