- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - OpenVMS
- >
- ssh return codes in dcl script
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
Forums
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
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
тАО06-17-2008 09:08 AM
тАО06-17-2008 09:08 AM
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-17-2008 09:13 AM
тАО06-17-2008 09:13 AM
Re: ssh return codes in dcl script
Since this is on a *VMS* operating system, you should post in the *OpenVMS* forum. This is HP-UX.
Ask a moderator to move this post by making a request here:
http://forums12.itrc.hp.com/service/forums/questionanswer.do?threadId=1236703
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-17-2008 09:18 AM
тАО06-17-2008 09:18 AM
Re: ssh return codes in dcl script
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-17-2008 09:24 AM
тАО06-17-2008 09:24 AM
Re: ssh return codes in dcl script
I would expect it to work about the same in the VMS environment, unless VMS explicitly requires different behaviour.
MK
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-17-2008 09:27 AM
тАО06-17-2008 09:27 AM
Re: ssh return codes in dcl script
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-17-2008 01:33 PM
тАО06-17-2008 01:33 PM
Re: ssh return codes in dcl script
Matti wrote
>>>
or 255 if a connection error occurred.
<<<
and you reacted
>>>
You would expect that. I wish it did.
<<<
Well, THAT would upset ANY VMS status questioning.
In VMS, ANY numeric _ODD_ status is (maybe qualified) _SUCCESS_, and any EVEN status is (maybe severe) ERROR.
So, evaluating a status of value '255' would be considered _successfull_ , for which a call which
>>>
either the file is empty, or never makes it back to the originating node
<<<
does not really qualify.
So, the returm code NEEDS to be translated, or REALLY weird things will happen.
(unlike Unixes, where it is up to the programmer to choose which codes mean what to which program, VMS is (and has always been) much more structured in defining such things).
But, obviously, somewhere some things do not go as expected, meaning either the documentation is not respected, or you have found some documenting or programming bug. (And I do not have the facilities to investigate which one applies here)
Proost.
Have one on me.
jpe
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-17-2008 04:46 PM
тАО06-17-2008 04:46 PM
Re: ssh return codes in dcl script
The protocol also specifies the ability to return signal values, which are well defined.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-17-2008 06:09 PM
тАО06-17-2008 06:09 PM
Re: ssh return codes in dcl script
I haven't seen anything like this, but that
proves little.
I've seen no evidence that the people who
wrote the SSH standards thought about any
non-UNIX-like OS, but I may have missed
something.
Depending on exactly what your requirements
are, you might be able to adapt something
like this:
alp $ define /user_mode sys$command nl:
alp $ ssh -o "batchmode yes" alp-l "pipe show defa ; write sys$output $status"
Authentication successful.
%X00030001:[SMS]
alp $ define /user_mode sys$command nl:
alp $ ssh -o "batchmode yes" alp-l "pipe show fred ; write sys$output $status"
Authentication successful.
\FRED\IVKEYW, unrecognized keyword - check validity and spelling
%X00038060
alp $
alp $ write sys$output f$message( %X00030001)
%CLI-S-NORMAL, normal successful completion
alp $ write sys$output f$message( %X00038060)
%CLI-W-IVKEYW, unrecognized keyword - check validity and spelling
(Your software is a bit newer than mine, so
you may not need all the quirk work-arounds.)
The terminal carriage control is pretty bad,
as usual, but it may easier to parse than to
look at. Or, write more to SYS$OUTPUT before
the important final status.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-18-2008 06:44 AM
тАО06-18-2008 06:44 AM
Re: ssh return codes in dcl script
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-18-2008 01:52 PM
тАО06-18-2008 01:52 PM
Re: ssh return codes in dcl script
Except it's different.
Knowing nothing, I'd guess that your status
file may not have been written and closed by
the time you try to fetch it. Feeding a
status value back through stdout should
avoid/evade a problem of that type.
There was a lot to be said for DECnet
task-to-task communication.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-23-2008 07:24 AM
тАО06-23-2008 07:24 AM
Re: ssh return codes in dcl script
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-23-2008 10:13 AM
тАО06-23-2008 10:13 AM
Solution$ pipe ssh nodex "pipe show fred ; write sys$output $status" | -
search sys$pipe "%X" | ( Read Sys$Pipe x ; Define/Job x &x )
$ status := %'f$extract(0,8,f$element(1,"%",f$trnlnm("x","lnm$job")))'
$ deassign/job x
$ show symbol status
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-23-2008 10:49 AM
тАО06-23-2008 10:49 AM
Re: ssh return codes in dcl script
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-23-2008 11:19 AM
тАО06-23-2008 11:19 AM
Re: ssh return codes in dcl script
Correction - this command line should specify that the f$extract lexical take the 8 character string beginning at position 1 and not 0.
$ status := %'f$extract(1,8,f$element(1,"%",f$trnlnm("x","lnm$job")))'
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-23-2008 11:32 AM
тАО06-23-2008 11:32 AM
Re: ssh return codes in dcl script
$ status := %X'f$extract(1,8,f$element(1,"%",f$trnlnm("x","lnm$job")))'
(Now if I could get an exit status from a remote command procedure, I'd be in heaven!)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-23-2008 11:42 AM
тАО06-23-2008 11:42 AM
Re: ssh return codes in dcl script
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-17-2008 08:17 AM
тАО10-17-2008 08:17 AM
Re: ssh return codes in dcl script
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-17-2008 08:39 AM
тАО10-17-2008 08:39 AM
Re: ssh return codes in dcl script
Have the procedure self-determine and set a pre-expired random password, and have the procedure communicate that value with the user. This could well apply a second-level trumping (assuming a web server is around, either Apache or a lighter-weight option), and run this whole password reset sequence as a CGI script, using https and email. (Here, you could conceivably use personally-issued certificates.)
Or go to certificates entirely, and get rid of passwords?
Or go to kerberos, and reset the password everywhere?
Or provide a generic and captive login on the host that performs the reset for the user. How you authenticate that user is an open (and local) question; these sorts of sequences can be secure, or can potentially be quite insecure.
As for the sequence itself, DCL can provide basic client-server; it's not great, but you can prompt for the sequence or the password over the link and then use symbol substitution directly. Here's an analogous (though DECnet-based) client-server sequence:
h71000.www7.hp.com/wizard/wiz_0159.html
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-17-2008 08:55 AM
тАО10-17-2008 08:55 AM
Re: ssh return codes in dcl script
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-17-2008 10:06 AM
тАО10-17-2008 10:06 AM
Re: ssh return codes in dcl script
One ssh-based approach might involve writing your own solution on top of the ssh transport; a so-called ssh subsystem. (fish is a variation on this.) Another approach would involve port forwarding. That's real work.
The generic difficulty here is the OpenVMS ssh daemon doesn't seem to be intended for this sort of thing; the sftp and scp pieces are present, but I don't know that HP supports other or user-written subsystems. (That written, the daemon does have port forwarding.) And that the OpenVMS ssh client is fairly weird and weak; it's definitely not what Unix users are accustomed to.
A solution akin to ssh -Y and its port forwarding (where the remote process does its thing, aiming its communications back over the link) would allow you to launch this stuff remotely, but you're still left to script part of this under bash or under DCL; on the client end.
As for a sign-up based approach, I've a fairly extensive and extensible user registration environment that's used on one of the public-access clusters; it's how you sign up for a username. Extending that to provide password reset wouldn't be a big effort. Full source code is available for download:
http://64.223.189.234/labsnotes/newuser102.zip
Cited alternative approaches are likely easier, and more reliable. DCL integration with TCP and with common IP applications is, well, lacking. As you've found.