Linux修改SSH默认的22端口及关闭密码认证登录
修改端口
修改sshd配置
1
vim /etc/ssh/sshd_config
编辑添加新的端口,默认Port=22
1
Port=8888
重启sshd
1
service sshd restart
关闭密码登录
修改sshd配置
1
vim /etc/ssh/sshd_config
找到
PasswordAuthentication,修改yes为no1
PasswordAuthentication no
重启sshd
1
service sshd restart
本博客所有文章除特别声明外,均采用 CC BY-NC-SA 4.0 许可协议。转载请注明来自 Akers's Blog!
评论




