Sujet : Re: Viewing SSH users on VMS
De : osuvman50 (at) *nospam* gmail.com (David Jones)
Groupes : comp.os.vmsDate : 31. Jul 2024, 15:02:00
Autres entêtes
Organisation : i2pn2 (i2pn.org)
Message-ID : <dcadcb05751d075777494f05153fb7170358ef40@i2pn2.org>
References : 1
User-Agent : Mozilla Thunderbird
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).