close

一般而言,系統管理者為了方便,都會使用 root 直接登入系統。

但是如果系統是放置在公司外面,又沒設定 Firewall 的狀況下,

很有可能被暴力破解方式猜出登入密碼。

為了防止此現象發生,可設定 root 只能使用 ssh key 方式登入系統,

其設定方法如下

 

vi /etc/ssh/sshd_config

 

在最後面加入以下幾行,即可達成目標。


# Example of overriding settings on a per-user basis
#Match User anoncvs
#       X11Forwarding no
#       AllowTcpForwarding no
#       ForceCommand cvs server
PermitRootLogin without-password
UseDNS no

arrow
arrow
    全站熱搜

    johnchen6927 發表在 痞客邦 留言(0) 人氣()