1828669 Members
1960 Online
109984 Solutions
New Discussion

Re: SET HOST/TELNET 0

 
Rob Kersey
Advisor

SET HOST/TELNET 0

$ SET HOST/TELNET 0
USERNAME
PASSWORD
$EXIT

If you put the above lines in a .com file and run you get

%SYSTEM-W-NODEVAVL, no device available
%SMG-F-INVPAS_ID, invalid pasteboard-id
%DCL-W-SKPDAT, image data (records not beginning with "$") ignored

Is this correct?

However if you use the following lines above in a .com you log straight in!!

$ SET HOST 0
USERNAME
PASWORD
$EXIT

Can you use the /TELNET qualifier on the end of a SET HOST command in this way?

Cheers

Rob
6 REPLIES 6
Martin P.J. Zinser
Honored Contributor

Re: SET HOST/TELNET 0

Reproduced this here. Set host/telnet is not the same as set host for DECnet. It actually invokes the standard telnet image behind your back. Also fiddeling with the /term qualifier did not make it work.
Dale A. Marcy
Trusted Contributor

Re: SET HOST/TELNET 0

I believe that you will need to use the following command:

$ Set Host/Telnet 127.0.0.0

instead of the:

$ Set Host/Telnet 0
Dale A. Marcy
Trusted Contributor

Re: SET HOST/TELNET 0

Sorry I mis-typed, it should be

$ Set Host/Telnet 127.0.0.1
Antoniov.
Honored Contributor

Re: SET HOST/TELNET 0

Hello Rob,
I need explain as DCL manages a .com; before executing DCL declare SYS$INPUT as file while SYS$COMMAND is unchanged on terminale device; then every line starting with $ sign is a command line and executed; executing application, if read from SYS$INPUT, get next line of .com that they haven't $ sign.

This command
$ SET HOST 0
USERNAME
PASSWORD
$EXIT
works because SET HOST /DECNET read from SYS$INPUT.
Telnet doesn't get from SYS$INPUT for security reason; also windows has same limitation.
Now, because telnet hasn't read from sys$input, file pointer of DCL (when tlnet exit) is located to USERNAME and DCL write
%DCL-W-SKPDAT, image data (records not beginning with "$") ignored
For this reason, if you will use edit in .com file you have write as follow
$ DEFINE SYS$INPUT SYS$COMMAND
$ EDIT/EDT myfile
Correlated command is DECK.

Sorry for long sentence but I can't write shortly.

H.T.H.
Antoniov
Antonio Maria Vigliotti
Keith Cayemberg
Trusted Contributor

Re: SET HOST/TELNET 0


Assuming RLOGIN has been enabled on your node,
you can have a R-Tools Proxy defined on
your node as the follows...

$ tcpip add proxy CAYEMBERG -
/REMOTE_USER=CAYEMBERG /HOST=localhost

then the following procedure can start
a telnet session without needing a password...

$ type TEST_TELNET.COM
$ assign/user sys$command sys$input
$ SET HOST/RLOGIN/USERNAME=CAYEMBERG localhost
$ exit

$ @TEST_TELNET.COM
[TNDRIVER: Proxy login for user "cayemberg" in progress ...]

$

Note:
This will also work with proxies defined
on other systems. However the proxy does
not work with TELNET.

Cheers!

Keith Cayemberg


Keith Cayemberg
Consultant
Wipro Technologies
John Gillings
Honored Contributor

Re: SET HOST/TELNET 0

Rob,

The SET HOST command is an anomoly in input processing, it checks the SYS$INPUT stream for a username and/or password, which (if found) is passed to the remote host. It then switches the input stream over to SYS$COMMAND. This requires some fairly ugly input processing hackery and also a protocol that has a mechanism for passing username/password. Also note that you cannot "script" a set host session because you can't control where the input comes from.

Telnet and SET HOST/TELNET behave more like "normal" DCL commands in terms of input handling. The Telnet protocol itself has no mechanism for passing a username/password, but rlogin does, as Keith has explained

(though one thing I would change in Keith's code is the use of "ASSIGN". ASSIGN was made obselete back in VMS V4.0, replaced with DEFINE. ASSIGN has several limitations and syntactic peculiarities and so should be avoided. Please use DEFINE instead:

$ DEFINE/USER SYS$INPUT SYS$COMMAND
$ SET HOST/RLOGIN/USERNAME=CAYEMBERG localhost

A crucible of informative mistakes