Linux · 2019-03-08

ssh禁止在ipv6上监听

root@localhost:~# netstat -nltp Active Internet connections (only servers) Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN 5866/sshd tcp6 0 0 :::22 :::* LISTEN 5866/sshd root@localhost:~# echo -ne '#ipv6 disallow\nAddressFamily inet\n' >> /etc/ssh/sshd_config root@localhost:~# service ssh restart ssh stop/waiting ssh start/running, process 6208 root@localhost:~# netstat -nltp Active Internet connections (only servers) Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN 6208/sshd