Re: Viewing SSH users on VMS

Liste des GroupesRevenir à co vms 
Sujet : Re: Viewing SSH users on VMS
De : news (at) *nospam* cct-net.co.uk (Chris Townley)
Groupes : comp.os.vms
Date : 31. Jul 2024, 17:31:33
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <v8dot6$1isug$1@dont-email.me>
References : 1 2
User-Agent : Mozilla Thunderbird
On 31/07/2024 15:02, David Jones wrote:
On 7/27/2024 1:34 PM, Chris Townley wrote:
On AXP ssh uses show as FT terminals, and the source can be seen, and accessed using the DVI code TT_ACCPORNAM. for example on AXP I see:
>
$ sh u /f/i
       OpenVMS User Processes at 27-JUL-2024 18:24:48.74
     Total number of users = 2,  number of processes = 2
>
Username  Process Name       PID     Terminal
SYSTEM    SYS_SYSTEM_01    0000012B  OPA0:
TOWNLEYC  CCT_TOWNLEYC_01  0000012A  FTA1:(ssh/merlin.fritz.box:50407)
>
However on X86 TT_ACPORNAM is blank, and I can find no method of seeing where they come from. OK it is probably me as it is always local, so it is perhaps not that important. But I do like a challenge!
>
Currently I just see:
>
1 $ sh u /f/i
       OpenVMS User Processes at 27-JUL-2024 18:29:41.86
     Total number of users = 2,  number of processes = 5
>
  Username  Process Name      PID     Terminal
  SYSTEM    SYSTEM          00000431  OPA0:
  TOWNLEYC  FTA12_TOWNLEYC  0000044C  FTA12:
  TOWNLEYC  FTA13_TOWNLEYC  0000044E  FTA13:
  TOWNLEYC  FTA14_TOWNLEYC  00000450  FTA14:
  TOWNLEYC  TOWNLEYC        00000448  FTA11:
>
Any ideas how I could get this information?
>
 The best I could do was make my personal finger program do this for
SSH connections (terminal FTA1):
                            FINGER Version 4.9
Wed  31-JUL-2024 09:18         HOBBY::          Up Since Fri  26-JUL-2024 00:36
Job counts: Interactive = 5, Network = 4, Detached = 3
 Username     Name                 Image        Line    Location
----------   -------------------- ------------ ------- -------------------------
JONESD       David Jones          < DCL >      FTA1:   PTY (SSHD22_BG7584)
                ""                 TCPIP$UCP    VTA1:   Host: 192.168.1.55 Port:
                ""                 < DCL >      VTA2:   Host: 192.168.1.55 Port:
                ""                 < DCL >      OPA0:   Unknown for OPA0:
                ""                 finger_x86   VTA3:   Host: 192.168.1.179 Port:
--------------------------------------------------------------------------------
 It uses $GETDVI to get the LOCKID value for the terminal, which the PTY driver
re-purposes to hold the ipid of that pseudoterminal's control process. It then
calls EXE$IPID_TO_EPID from exec mode to get an epid we can use with $GETJPI to
fetch its process name (SSHD22_BG7584). I never found a way to get the remote
connect information from the name of the TCPIP device (assuming the process name
reliably reflected it).
Thanks, that is interesting. Of course in the past the source node, and user was put into the terminals TT_ACCPORNAM, so easy to get.
What I have discovered, which could make getting the parent PID unnecessary, is that a log file is created in SSH$ROOT:[VAR] named either
<this_hostname>_<remote host or IP address>_<process_PID>.log
or
<remote host or IP address>_<process_PID>.log
but unless the login fails, nothing is written.
No idea why or when which form is used.
Can I presume that a PID will be unique until a system reboot? If so I could delete/rename these logs at system startup, then look for the file, at least to get the remote node, and add to the process name.
Otherwise maybe I cold hack the client startup to create a readable file with remote node and user?
--
Chris

Date Sujet#  Auteur
27 Jul 24 * Viewing SSH users on VMS33Chris Townley
27 Jul 24 +* Re: Viewing SSH users on VMS17Craig A. Berry
27 Jul 24 i+* Re: Viewing SSH users on VMS14Arne Vajhøj
27 Jul 24 ii`* Re: Viewing SSH users on VMS13Lawrence D'Oliveiro
28 Jul 24 ii `* Re: Viewing SSH users on VMS12Arne Vajhøj
28 Jul 24 ii  `* Re: Viewing SSH users on VMS11Chris Townley
28 Jul 24 ii   `* Re: Viewing SSH users on VMS10Arne Vajhøj
28 Jul 24 ii    +* Re: Viewing SSH users on VMS8Craig A. Berry
28 Jul 24 ii    i`* Re: Viewing SSH users on VMS7Scott Dorsey
28 Jul 24 ii    i `* Re: Viewing SSH users on VMS6Craig A. Berry
29 Jul 24 ii    i  `* Re: Viewing SSH users on VMS5Lawrence D'Oliveiro
29 Jul 24 ii    i   `* Re: Viewing SSH users on VMS4Craig A. Berry
29 Jul 24 ii    i    +- Re: Viewing SSH users on VMS1Simon Clubley
29 Jul 24 ii    i    `* Re: Viewing SSH users on VMS2Hunter Goatley
29 Jul 24 ii    i     `- Re: Viewing SSH users on VMS1Lawrence D'Oliveiro
7 Aug 24 ii    `- Re: Viewing SSH users on VMS1Gary Sparkes
27 Jul 24 i`* Re: Viewing SSH users on VMS2Chris Townley
28 Jul 24 i `- Re: Viewing SSH users on VMS1Lawrence D'Oliveiro
31 Jul 24 +* Re: Viewing SSH users on VMS12David Jones
31 Jul 24 i`* Re: Viewing SSH users on VMS11Chris Townley
31 Jul 24 i `* Re: Viewing SSH users on VMS10Chris Townley
31 Jul 24 i  `* Re: Viewing SSH users on VMS9David Jones
31 Jul 24 i   +- Re: Viewing SSH users on VMS1Chris Townley
1 Aug 24 i   +- Re: Viewing SSH users on VMS1Dennis Boone
1 Aug 24 i   `* Re: Viewing SSH users on VMS6bill
1 Aug 24 i    `* Re: Viewing SSH users on VMS5Robert A. Brooks
1 Aug 24 i     `* Re: Viewing SSH users on VMS4bill
2 Aug 24 i      `* Re: Viewing SSH users on VMS3Lawrence D'Oliveiro
2 Aug 24 i       +- Re: Viewing SSH users on VMS1Dave Froble
2 Aug 24 i       `- DECNet, was: Re: Viewing SSH users on VMS1Simon Clubley
2 Aug 24 `* Re: Viewing SSH users on VMS3David Jones
4 Aug 24  `* Re: Viewing SSH users on VMS2David Jones
5 Aug 24   `- Re: Viewing SSH users on VMS1Chris Townley

Haut de la page

Les messages affichés proviennent d'usenet.

NewsPortal