ssh配置修改

调试

ssh -v vagrant@172.16.17.11

备份

cp /etc/ssh/sshd_config /etc/ssh/sshd_config

sshd_config修改端口(端口范围:0-65535)

Port 2231

不允许root用户通过ssh登录

PermitRootLogin no

不使用DNS

UseDns no

不允许空密码登录

PasswordAuthentication no

重启生效

/etc/init.d/sshd restart

解决ssh慢的问题

UseDNS no
GSSAPIAuthentication no
坚持原创技术分享,您的支持将鼓励我继续创作!