


CentOS下ssh如何登錄限制ip
添加時(shí)間:2019-9-15 21:58:18
添加:
思海網(wǎng)絡(luò)
linux下ssh登錄限制ip的方法
vi /etc/hosts.allow
sshd:192.168.0.100:allow //允許IP 192.168.0.100 登錄
sshd:192.168.0.:allow //允許IP 192.168.0. 網(wǎng)段登錄
sshd:all:deny //禁止其他的所有IP登錄
或者
sshd:223.227.223.*:allow //允許IP 223.227.223.* 網(wǎng)段登錄
sshd:192.168.0.*:allow //允許IP 192.168.0.* 網(wǎng)段登錄
sshd:all:deny //禁止其他的所有IP登錄
fedora下 修改后保存后生效
freeBSD限制特定ip的ssh登陸:
1.
#ee /etc/hosts.allow
在ALL : ALL : allow的前面加上
sshd : 192.168.0.100 : allow
sshd : 223.227.223.* : allow
sshd : ALL : deny
2.
修改/etc/ssh/sshd_config
加入
Allowusers admin@172.16.2.188
意思為
只允許admin從172.16.2.188登陸
FreeBSD 改IP ,不用重啟電腦:
在rc.conf里改完后/etc/netstart
關(guān)鍵字:CentOS、ssh、登錄、限制ip
新文章:
- CentOS7下圖形配置網(wǎng)絡(luò)的方法
- CentOS 7如何添加刪除用戶
- 如何解決centos7雙系統(tǒng)后丟失windows啟動(dòng)項(xiàng)
- CentOS單網(wǎng)卡如何批量添加不同IP段
- CentOS下iconv命令的介紹
- Centos7 SSH密鑰登陸及密碼密鑰雙重驗(yàn)證詳解
- CentOS 7.1添加刪除用戶的方法
- CentOS查找/掃描局域網(wǎng)打印機(jī)IP講解
- CentOS7使用hostapd實(shí)現(xiàn)無(wú)AP模式的詳解
- su命令不能切換root的解決方法
- 解決VMware下CentOS7網(wǎng)絡(luò)重啟出錯(cuò)
- 解決Centos7雙系統(tǒng)后丟失windows啟動(dòng)項(xiàng)
- CentOS下如何避免文件覆蓋
- CentOS7和CentOS6系統(tǒng)有什么不同呢
- Centos 6.6默認(rèn)iptable規(guī)則詳解