关于使用netstat -lantup查看的SSHD 6010端口解释:
1.使用netstat -lantup查看当前系统开启的服务端口
tcp6 0 0 ::1:6010 :::* LISTEN 1663/sshd: root@pts
发现
[root@server ~]# netstat -lantup
Active Internet connections (servers and established)
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 1249/sshd
tcp 0 0 127.0.0.1:6010 0.0.0.0:* LISTEN 1663/sshd: root@pts
tcp 0 36 192.168.0.100:22 192.168.0.99:2333 ESTABLISHED 1663/sshd: root@pts
tcp 0 0 192.168.0.100:22 192.168.0.99:2334 ESTABLISHED 1671/sshd: root@not
tcp6 0 0 ::1:6010 :::* LISTEN 1663/sshd: root@pts
udp 0 0 0.0.0.0:68 0.0.0.0:* 1038/dhclient
[root@server ~]#
2.经查询是/etc/ssh/sshd_config中X11Forwarding yes开启了,
3.修改/etc/ssh/sshd_config,将这个参数注释,重启sshd服务,重断开连接重新登录,6010端口就会关闭了。
[root@server ~]# netstat -lantup
Active Internet connections (servers and established)
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 1908/sshd
tcp 0 0 192.168.0.100:22 192.168.0.99:2581 ESTABLISHED 1926/sshd: root@not
tcp 0 36 192.168.0.100:22 192.168.0.99:2580 ESTABLISHED 1921/sshd: root@pts
udp 0 0 0.0.0.0:68 0.0.0.0:* 1038/dhclient
[root@server ~]#