在我的Linode sudo netstat -tulp给我:
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name tcp 0 0 *:ssh *:* LISTEN 2030/sshd tcp 0 0 *:http *:* LISTEN 2178/httpd tcp 0 0 *:ssh *:* LISTEN 2030/sshd udp 0 0 *:bootpc *:* 1937/dhclient
为什么在那里sshd两次?
其中一个正在监听IPv4连接,一个正在监听IPv6连接:
michael:~> netstat -tl |grep ssh tcp 0 0 *:ssh *:* LISTEN tcp 0 0 *:ssh *:* LISTEN michael:~> netstat -tln |grep 22 tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN tcp 0 0 :::22 :::* LISTEN