0

I want to loggin in an openvms system using SSH progamatically then issue remote commands on the server. Putty will let me do that because f$mode() is 'BATCH' but with any SSH library I have used, the f$mode is 'OTHER' and that creates errors in my login.com.

Do you know of any command available to change the f$mode once connected ? I would like to change it from 'OTHER' to 'BATCH' so that I can then execute my login.com properly from the software connecting to the host.

RitonLaJoie
  • 211
  • 3
  • 5
  • 1
    It sounds like it is returning the correct value for a detached process. Is there a reason that you can't modify your LOGIN.COM to handle both values? – HABO Jan 05 '12 at 03:43

1 Answers1

1

When I use Putty to connect to OpenVMS, my f$mode is "INTERACTIVE". I am a little surprised you are getting BATCH...perhaps it depends on which implementation of SSH you are using on VMS (ie. HP's TCPIP Services or Multinet).

Having said that, you the f$mode() call indicates what sort of process is running to handle your SSH client, so it is not possible to turn a BATCH process into an INTERACTIVe process.

In our sylogin.com, we detect SSH terminals by checking for 2 things...is the terminal device an "FTA" device, and if so, does it have the SECURE attribute set. At this point I will point out that we are using TCPIP Services for SSH.

DCL to do the check,

$ 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

$! if the code gets to here, you most likely have an SSH connection

ChrisB
  • 96
  • 2