参考步骤:
(1).执行备份:
#cp -p /etc/ssh/sshd_config /etc/ssh/sshd_config_bak
(2).新建一个普通用户并设置高强度密码(防止设备上只存在root用户可用时,无法远程访问):
#useradd username
#passwd username
(3).禁止root用户远程登录系统
3.1.编辑文件/etc/ssh/sshd_config(vi /etc/ssh/sshd_config),修改PermitRootLogin值为no并去掉注释.
PermitRootLogin no #则禁止了root从ssh登录。
3.2.重启ssh服务
#/etc/init.d/sshd restart
(4).修改ssh协议版本
4.1.编辑文件/etc/ssh/sshd_config(vi /etc/ssh/sshd_config),修改Protocol的值为2并去掉注释.
Protocol 2
4.2.重启ssh服务
#/etc/init.d/sshd restart
最后欢迎大家访问我的个人网站:1024s