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