
正文
centos 7 禁止root登录及更改ssh端口号
提示:扫一扫查出行【扫一扫了解最新限行尾号】
复制提示
vim /etc/ssh/sshd_config
PermitRootLogin yes => PermitRootLogin no
PasswordAuthentication yes => PasswordAuthentication no
RSAAuthentication yes
PubkeyAuthentication yes
systemctl restart sshd.service
netstat -tulnp|grep sshd
vim /etc/ssh/sshd_config
Port => Port
systemctl restart sshd.service
netstat -tulnp|grep sshd
vim /etc/ssh/sshd_config
#ClientAliveInterval => ClientAliveInterval
#ClientAliveCountMax => ClientAliveCountMax
systemctl restart sshd.service
netstat -tulnp|grep sshd






