dropbear
我在 Debian(實際上是 Raspbian)上作為 SSH 守護程式運行。我嘗試設定
# /etc/hosts.allow
dropbear:192.168.1.1
# my static ip from which I SSH connect to the device
和
# /etc/hosts.deny
ALL:ALL
# block all others
然後我重新啟動了整個裝置。我仍然可以從不同的 IP 位址甚至遠端透過 SSH 連接到設備。是我設定檔錯誤還是不dropbear
支援這兩個檔案?
答案1
答案2
嘗試:
# /etc/hosts.deny
sshd:ALL:spawn /bin/echo the ip %h tried to access `/bin/date`>> /var/log/ssh.log
和
# /etc/hosts.allow
sshd:192.168.1.1
如果不起作用,請以這種方式使用 dropbear 重試。
# /etc/hosts.deny
dropear:ALL:spawn /bin/echo the ip %h tried to access `/bin/date`>> /var/log/ssh.log
和
# /etc/hosts.allow
dropbear:192.168.1.1
並檢查 dropbear 是否支援 tcp/wrappers。
ldd /path/to/dropbear
尋找libwrap.so.0 → /lib/libwrap.so.0