centos7 通过ssh 登入系统慢的解决方法

admin2年前IT技术1182

前几天更新了centos7 ( 树莓派3b+硬件环境),发现 ssh登入时间很长,还以为sd 卡出现故障。通过排查不是硬件故障。而是由于ssh的配置文件开启了UseDNS功能 。服务器会先根据客户端的 IP地址进行 DNS PTR反向查询出客户端的主机名,然后根据查询出的客户端主机名进行DNS正向A记录查询,并验证是否与原始 IP地址一致,通过此种措施来防止客户端欺骗。

   1.通过修改服务器端配置文件 vim /etc/ssh/sshd_config (需要管理员权限)

# vim /etc/ssh/sshd_config

#Compression delayed
#ClientAliveInterval 0
#ClientAliveCountMax 3
#ShowPatchLevel no
UseDNS no
#PidFile /var/run/sshd.pid
#MaxStartups 10:30:100
#PermitTunnel no
#ChrootDirectory none


复制代码
# vim /etc/ssh/sshd_config#Compression delayed#ClientAliveInterval 0#ClientAliveCountMax 3#ShowPatchLevel noUseDNS no#PidFile /var/run/sshd.pid#MaxStartups 10:30:100#PermitTunnel no#ChrootDirectory none
复制代码

添加或修改为 UseDNS no 

 

2.重启 ssh  服务:

   

root# service sshd restart

 

   

               


相关文章

使用excel的翻译功能

使用excel的翻译功能

1.打开审阅2.打开翻译就可以实现翻译...

未命名

<?phpnamespace Article;class Comment { }namespace MessageBoard;class Comment { }//调用当前空间(MessageB...

15天学会php视频教程下载

 下载链接百度网盘下载...

15天掌握php

˂a href="download/php/第一课--15天掌握php.zip" target="_blank"˃第一课...

关于jquery升级至1.8版本之后的兼容问题Uncaught TypeError: $(...).size is not a function

关于jquery升级至1.8版本之后的兼容问题Uncaught TypeError: $(...).size is not a function

之前也遇到过这种问题Uncaught TypeError: $(...).size is not a function  控制台报错如上图,打开Frame.js可以看到里面定义大小...

发表评论    

◎欢迎参与讨论,请在这里发表您的看法、交流您的观点。