Operating System - HP-UX
1819803 Members
3010 Online
109607 Solutions
New Discussion юеВ

How can I know user telnet udp port

 
Jack Fan
Regular Advisor

How can I know user telnet udp port

All,
How can I know user telnet udp port?

I only use netstat to show deticate IP address netstat -a | grep 10.37.119.174
tcp 0 0 wmxcto.telnet 10.37.119.174.2398 ESTABLISHED
tcp 0 0 wmxcto.telnet 10.37.119.174.2402 ESTABLISHED
tcp 0 0 wmxcsd.telnet 10.37.119.174.2523 ESTABLISHED

But I want to identify which entry is owned by this login account on script file...How can I do?
3 REPLIES 3
KapilRaj
Honored Contributor

Re: How can I know user telnet udp port

lsof |egrep "10.37.119.174|$SCRIPT_NAME"

Kaps
Nothing is impossible

Re: How can I know user telnet udp port

hi

telnet can't use udp port. It use only tcp connect
see man 1m telnetd
"The Internet daemon (inetd)
executes telnetd when it receives a service request at the port listed
in the services database for telnet using the tcp protocol (see
inetd(1M) and services(4))."
Dietmar Konermann
Honored Contributor

Re: How can I know user telnet udp port

Hmmm, I assume you are searching for the TCP connection since telnet doesn't use UDP.

Usually I would recommend to use lsof, e.g.:

# lsof -bp 2>/dev/null | grep ESTABLISHED

Unfortunately lsof doesn't support IPv6 yet. So for telnet on IPv6 enabled systems you see only "unsupported family: AF_22".

#define AF_INET6 22 /* IPv6 protocol */

To use lsof you would need to change "tcp6" to "tcp" in inetd.conf or get lsof enhanced to support AF_INET6 connections.

Best regards...
Dietmar.



"Logic is the beginning of wisdom; not the end." -- Spock (Star Trek VI: The Undiscovered Country)