how to get source ip of a telnet session

Harold L Hunt II huntharo@msu.edu
Wed Jul 30 19:45:00 GMT 2003


Any reason you can't grep the output of tlntadmn to get what you need?

By the way, when I run tlntadmn /? I get:

C:\Documents and Settings\harold>tlntadmn /?

Usage: tlntadmn [computer name] [common_options] start | stop | pause | 
continue
  | -s | -k | -m | config config_options
                            Use 'all' for all sessions.
      -s sessionid          List information about the session.
      -k sessionid          Terminate a session.
      -m sessionid          Send message to a session.

      config                Configure telnet server parameters.

common_options are:
      -u user               Identity of the user whose credentials are 
to be used

      -p password           Password of the user

config_options are:
     dom = domain           Set the default domain for user names
     ctrlakeymap = yes|no   Set the mapping of the ALT key
     timeout = hh:mm:ss     Set the Idle Session Timeout
     timeoutactive = yes|no Enable idle session timeout.
     maxfail = attempts     Set the maximum number of login failure attempts
                            before disconnecting.
     maxconn = connections  Set the maximum number of connections.
     port = number          Set the telnet port.
     sec = [+/-]NTLM [+/-]passwd
                            Set the authentication mechanism
     mode = console|stream  Specify the mode of operation.

C:\Documents and Settings\harold>


So, what do you mean when you say it does not seem to accept arguments?

Harold


msg wrote:

> Greetings:
> 
> We need a method of learning the ip address of the client in a telnet
> session to a Win2k Server SP3 host; the information will be used in
> the user's ~/.profile to set the DISPLAY variable prior to starting
> an X session.
> 
> On Unix one may use 'lsof' (if available) and grep on the shell pid and
> file descriptor 0 to find the line containing the source ip addr. In
> some flavors of Unix the /proc filesystem can also be of help.
> 
> We're currently using the native Windows Telnet Server; 'tlntadmn.exe'
> can interactively show connections and provide a SESSION ID crossed
> to the ip address; one could conceivably cross the SESSION ID to
> the bash pid but the 'tlntadmn' tool isn't well documented and doesn't
> seem to accept arguments so it is useless in scripts.
> 
> All suggestions much appreciated.
> 
> Michael Grigoni
> Cybertheque Museum



More information about the Cygwin-xfree mailing list