useradd eason vim
passwd eason服务器
vi /etc/ssh/sshd_configssh
查找“#PermitRootLogin yes”,将前面的“#”去掉,短尾“yes”改成“no”,并保存文件。3d
找到#Port 22字段删掉#,将22改成其余不被使用的端口rest
服务器端口最大能够开到65536blog
vim /etc/sudoersip
systemctl restart firewalldit
/etc/init.d/sshd restartio
service restart sshdclass
ssh -p 34567 user@ip