很簡單,211.63.239.11的用戶想用ssh登入您的主機,
哈啦有在玩Linux應該知道sshd是幹麻的,
我的作法你可以用用看,
1.
/etc/hosts.deny
加入以下
sshd : ALL : spawn (/bin/echo Security notice from host `/bin/hostname`; \
/bin/echo; /usr/sbin/safe_finger @%h ) | \
/bin/mail -s "%d -%h security"
[email protected] & \
: twist ( /bin/echo -e "\n\nWARNING connectin not allowed. Your attempt has been logged. \n\n\n警告!您尚未允許登入,您的連線將會被紀錄,並且作為以後的參考\n ". )
紅色處填上您的email信箱
2.
開啟/etc/hosts.allow
sshd: 192.168.1.
這裡要注意最後面有一個點
3.以後若是你要使用sshd登入您的server就只能在您的local或者主機登入了,
(若是您的主機使用固定ip,可以採用兩張網卡,或者將網卡設定第二個ip)
4.
最簡單的阻擋某一個特定ip的方法則是在/etc/hosts.deny裡面加上
sshd: xxx.xxx.xxx.xxx(IP)