目录

Red Hat SSH 不能登录及登录慢解决方法

# 1.检查防火墙

Administration -> Secuity Level and Firewall . Firewall Disabled SELinux Setting: Disabled

# 2.允许 root 通过 SSH 登录

1.以 root 的身份编辑 sshd_config 文件(/etc/ssh/sshd_config):

vi /etc/ssh/sshd_config
1

2.在这个文件的 Authentication 数据段中添加一行 PermitRootLogin yes。这行内容可能已经存在,如果它被注释掉(使用"#"),您只需要删除 "#"。

# Authentication:
#LoginGraceTime 2m
PermitRootLogin yes
#StrictModes yes
#MaxAuthTries 6
#MaxSessions 10
1
2
3
4
5
6

3.保存修改过的 /etc/ssh/sshd_config 文件。 4.重启 SSH 服务器:

service sshd restart
1

# 3.RHEL7.x解决SSH登录慢

vim /etc/ssh/sshd_config
修改内容
GSSAPIAuthentication no
UseDNS no
重启服务
systemctl restart sshd
1
2
3
4
5
6

# 参考链接

  • https://access.redhat.com/documentation/zh-cn/red_hat_enterprise_linux/6/html/v2v_guide/preperation_before_the_p2v_migration-enable_root_login_over_ssh
  • https://blog.csdn.net/weixin_33979745/article/details/93108056
  • https://blog.csdn.net/iteye_4972/article/details/82613366
上次更新: 2024/03/20, 23:57:47
最近更新
01
使用 acme.sh 自动化SSL证书管理
03-25
02
COSCLI 的使用记录
03-25
03
腾讯云命令行工具 TCCLI
03-25
更多文章>