1. 找到檔案 /etc/ssh/sshd_config
2. 修改其中的
#PermitRootLogin yes
改為
PermitRootLogin no (注意開頭不要有井字號 #)
3. 重新啟動 SSH
/etc/rc.d/sshd restart
Reference:
禁止root直接登入:http://chenmacgyver.bhd restspot.com/2007/08/root.html
ssh 禁止 efere登入 (內容是英文) / 2009/xwin32kb/how-do-i-restart-sshd-on-my-unix-system/