Operating System - OpenVMS
cancel
Showing results for 
Search instead for 
Did you mean: 

SSH within DCL command procedure

SOLVED
Go to solution
Thomas A. Williams
Regular Advisor

SSH within DCL command procedure

When I try to execute this command:

$ ssh nodename dir

it works fine from the command line, but from a command procedure I get this error:

dsa13:[sys0.syscommon.][sysexe]tcpip$ssh_ssh2.exe: FATAL: ssh_io_register_fd: fd 3 already registered!

%TCPIP-F-SSH_FATAL, non-specific fatal error condition

Any ideas?
9 REPLIES
Ian Miller.
Honored Contributor

Re: SSH within DCL command procedure

which version?
You need to be current as the variou ECO kits contains many ssh fixes.

You may need the -n qualifier.
____________________
Purely Personal Opinion
Thomas A. Williams
Regular Advisor

Re: SSH within DCL command procedure

We're running V5.4 ECO 5. Is this in V5.5?
Thomas A. Williams
Regular Advisor

Re: SSH within DCL command procedure

Ian Miller>> You may need the -n qualifier.

Interestingly enough, when I tried this from the command line:

ssh -n nodename dir

I get the same exact error as I posted above, when I tried it from the command procedure.

Obviously I don't know how to use -n properly. Any guidance on the proper usage? Maybe if I knew that it would fix the original problem...
Steven Schweda
Honored Contributor
Solution

Re: SSH within DCL command procedure

The secret is '-o "batchmode yes"', as in:

alp $ type SSH_SHD.COM
$ ssh -o "batchmode yes" alp "show default"

alp $ @ SSH_SHD.COM
Authentication successful.


ALP$DKA0:[SMS]


Of course, it still hangs at the end until
the user hits , but who really
expects this stuff to work properly?

Also, "-t" tends to be useful for proper
line-endings when dealing with non-VMS hosts.

alp $ tcpip show version

HP TCP/IP Services for OpenVMS Alpha Version V5.4 - ECO 5
on a COMPAQ Professional Workstation XP1000 running OpenVMS V7.3-2

alp $ ssh "-V"
alp$dka0:[sys0.syscommon.][sysexe]tcpip$ssh_ssh2.exe: SSH Secure Shell OpenVMS (
V5.5) 3.2.0 on COMPAQ Professional Workstation - VMS V7.3-2
Thomas A. Williams
Regular Advisor

Re: SSH within DCL command procedure

That was it. Thanks Steven.

I like the "who really expects this stuff to work" comment - how true that is.

It seems to me that SSH on VMS is a real hack job, lots of bu... coughcough "features"

;-)

Now I'm trying to figure out how to eliminate the user having to press return "feature" - I've sort of gotten it to finish by assigning sys$output to a file prior to running the ssh command, but that only seems to work about 50% of the time... Strange.
Steven Schweda
Honored Contributor

Re: SSH within DCL command procedure

Regarding the hang, waiting for an interactive
, I don't think that I ever found a
real work-around. Perhaps some extra action
on the remote side would help, but I keep
hoping for a real fix before I have a real
need.

If you find something clever, be sure to post
it somewhere.
Thomas A. Williams
Regular Advisor

Re: SSH within DCL command procedure

We found a workaround to the hanging/need CR problem:

$ define/user sys$command nl:
$ ssh -o "batchmode yes" baltic dir

Seems to work.
Duncan Morris
Honored Contributor

Re: SSH within DCL command procedure

Hi, Thomas,

from your Forum Profile:


I have assigned points to 0 of 33 responses to my questions.


Maybe you can find some time to do some assigning?

http://forums1.itrc.hp.com/service/forums/helptips.do?#33

Mind, I do NOT say you necessarily need to give lots of points. It is fully up to _YOU_ to decide how many. If you consider an answer is not deserving any points, you can also assign 0 ( = zero ) points, and then that answer will no longer be counted as unassigned.

Consider, that every poster took at least the trouble of posting for you!

To easily find your streams with unassigned points, click your own name somewhere.
This will bring up your profile.
Near the bottom of that page, under the caption "My Question(s)" you will find "questions or topics with unassigned points " Clicking that will give all, and only, your questions that still have unassigned postings.

Thanks on behalf of your Forum colleagues.

PS. nothing personal in this. I try to post it to everyone with this kind of assignment ratio in this forum. If you have received a posting like this before please do not take offence none is intended!


Steven Schweda
Honored Contributor

Re: SSH within DCL command procedure

> $ define/user sys$command nl:

Works here, too. Must be the functional
equivalent of what "-n" was supposed to do,
while an actual "-n" seems to be useless (as
does "$ define/user sys$input nl:").

Well, that was educational. I'll have to go
fix my scripts now.