
コマンド:sudo netstat -ntulp
私にください:
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0 127.0.0.1:3306 0.0.0.0:* LISTEN 1263/mysqld
tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN 1357/sshd
tcp6 0 0 :::80 :::* LISTEN 1857/apache2
tcp6 0 0 :::22 :::* LISTEN 1357/sshd
tcp6 0 0 :::443 :::* LISTEN 1857/apache2
sshdが2回リストされているのはなぜですか? 0.0.0.0:22と:::22の違いは何ですか?
答え1
これは正常です。0.0.0.0:22
IPv4、:::22
IPv6です。
両方の行が同じPIDに関連付けられているという事実は、SSHデーモンが1つしかないことを示します。