- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - OpenVMS
- >
- Re: Detecting SSH Connections in LOGIN.COM
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-27-2010 02:18 PM
тАО10-27-2010 02:18 PM
So far, I see that Telnet connections assign a TN device, while SSH assigns an FT device, but FT can also represent other "virtual?" devices, so this won't work.
I've worked out a massively kludgey method where:
1) translate SYS$REM_NODE_FULLNAME to get remote node name
2) use TCPIP SHOW HOST to convert name to IP address
3) PIPE TCPIP SHO DEV | ( SEARCH SYS$PIPE ip-address ; @script-to-look-for-string-SSH-and-port#-22 )
There's gotta be some way simpler way. A F$GETDEV("TT","some-param") maybe?
???
TIA
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-27-2010 03:12 PM
тАО10-27-2010 03:12 PM
SolutionThis is how we do it.
$ term = f$getjpi(0,"TERMINAL")
$ if (term .eqs. "") .or. (f$length(term) .le. 3)
$ then exit
$ endif
$ if f$extract(0,3,term) .nes. "FTA" then exit ! SSH terminals are FTA devices
$ if .not. f$getdvi(term,"TT_SECURE") then exit ! but so are Decterm ones, so check the SECURE attrib of term
Seems to do the trick.
Cheers,
Chris
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-27-2010 03:21 PM
тАО10-27-2010 03:21 PM
Re: Detecting SSH Connections in LOGIN.COM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-27-2010 04:53 PM
тАО10-27-2010 04:53 PM
Re: Detecting SSH Connections in LOGIN.COM
I'd check:
1) non-null SYS$REM_NODE
2) F$GETDVI("TT","DEVCLASS") = DC$_TERM (66).
3) F$GETDVI("TT","TT_SECURE")
I'm fairly sure all 3 will only be true for an SSH connection.
You could also check F$MODE(), but I'm not sure if it would add any value.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-28-2010 05:55 AM
тАО10-28-2010 05:55 AM
Re: Detecting SSH Connections in LOGIN.COM
then the following is the best way to tell:
Look for "ssh/" in the first part of tt_accpornam, as in:
$ write sys$output f$getdvi("tt:","tt_accpornam")
ssh/foo.bar.com:2338
Check the logical MULTINET_KERNEL_BASE_ADDRESS to determine if MultiNet is running.
Check for the logical TCPWARE_NETCP_MBX to determine if TCPware is running.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-28-2010 10:31 AM
тАО10-28-2010 10:31 AM