we have some perl scripts to do things on guardian os on a hp nonstop machine with telnet. Now we have to shut down telnet and have to use the ssh (comforte) connection with a safeguarduser.
We try to connect with the following perl code and anything seems to work but the shell does not keep open.
use Net::SSH::Perl;
use Term::ReadKey;
my $host = "XX.XXX.XXX.XXX";
my $user = "safeguarduser";
my $pass = "";
my $ssh = Net::SSH::Perl->new($host, options => [
"Cipher +aes256-ctr", "MACs +hmac-sha2-256", "HostKeyAlgorithms +ssh-dss"], debug => 1);
$ssh->login($user, $pass);
The debug log says:
p-066280682253: Reading configuration data C:\Users\User\.ssh\config
p-066280682253: Reading configuration data C:\WINDOWS\ssh_config
p-066280682253: Connecting to XX.XXX.XXX.XXX, port 22.
p-066280682253: Remote version string: SSH-2.0-1.37g sshlib: TXXXXH0X_14MAY2018_comForte_SSH2_0105a:\TXXXX.$SSH01
p-066280682253: Remote protocol version 2.0, remote software version 1.37g sshlib: TXXXXH0X_14MAY2018_comForte_SSH2_0105a:\TXXXX.$SSH01
p-066280682253: Net::SSH::Perl Version 2.14, protocol version 2.0.
p-066280682253: No compat match: 1.37g sshlib: TXXXXH0X_14MAY2018_comForte_SSH2_0105a:\TXXXX.$SSH01.
p-066280682253: Connection established.
p-066280682253: Sent key-exchange init (KEXINIT), waiting for response.
p-066280682253: Using diffie-hellman-group-exchange-sha256 for key exchange
p-066280682253: Host key algorithm: ssh-dss
p-066280682253: Algorithms, c->s: aes256-ctr hmac-sha2-512 none
p-066280682253: Algorithms, s->c: aes256-ctr hmac-sha2-512 none
p-066280682253: Entering Diffie-Hellman Group Exchange.
p-066280682253: SSH2_MSG_KEX_DH_GEX_REQUEST(2048<4096<8192) sent
p-066280682253: Sent DH Group Exchange request, waiting for reply.
p-066280682253: Received 2048 bit DH Group Exchange reply.
p-066280682253: Generating new Diffie-Hellman keys.
p-066280682253: Entering Diffie-Hellman key exchange.
p-066280682253: Sent DH public key, waiting for reply.
p-066280682253: Received host key, type 'ssh-dss'.
p-066280682253: Host 'XX.XXX.XXX.XXX' is known and matches the host key.
p-066280682253: Verifying server signature.
p-066280682253: Send NEWKEYS.
p-066280682253: Waiting for NEWKEYS message.
p-066280682253: Enabling encryption/MAC/compression.
p-066280682253: Sending request for user-authentication service.
p-066280682253: Service accepted: ssh-userauth.
p-066280682253: Trying empty user-authentication request.
p-066280682253: Login completed, opening dummy shell channel.
p-066280682253: channel 0: new [client-session]
p-066280682253: Requesting channel_open for channel 0.
p-066280682253: channel 0: open confirm rwindow 1048576 rmax 57344
p-066280682253: Got channel open confirmation, requesting shell.
p-066280682253: Requesting service shell on channel 0.
We can connect and work with Putty. The exec Command in the putty settings is "tacl". With plink it only works when we use the putty session-name. With param and -c tacl we get the same error as with the perl script, there is no shell.
(Info: The client is a Windows PC)
Hope somebody can help us, we have already tried a lot.
Thank you and Best regards
Can you explain exactly what it is you did with telnet sessions before you had to switch to SSH? Off-hand I think you are probably ending up in OSS (the UNIX personality of NonStop) because puTTY (and probably plink) emulate an XTerm. NonStop SSH automatically puts you into OSS if the terminal type specified during SSH negotiations isn't "TN6530-8" (The NonStop Guardian terminal emulator).
I just tried plink (Windows 10 CMD prompt) and got this, which is expected:
C:\Users\andy\Downloads>plink -ssh -pw xxxxxxx [email protected] gtacl -c 'status *,user'
Using keyboard-interactive authentication.
Last Logon: 03 DEC 2018, 05:37
Last Unsuccessful Attempt: 03 DEC 2018, 05:31 Total Failures: 20
Process Pri PFR %WT Userid Program file Hometerm
$Z4YN B 0,119 146 001 8,1 $SYSTEM.SYS07.TACL $ZTN0.#PTB2NV5
$SSLS 0,504 148 001 8,1 $SYSTEM.SSLPRXY.SSLPRXY $ZPTY.#ZWN0517
$SSFS 0,749 148 001 8,1 $SYSTEM.SSLPRXY.SSLFTPS $ZPTY.#ZWN0517
$Z2TJ 2,74 149 005 8,1 $SYSTEM.SYS07.TACL $ZPTY.#ZWN0882
$Z5MZ 2,75 149 001 8,1 $SYSTEM.SYS07.TACL $ZPTY.#ZWN0886
$Z5NR 2,254 149 004 8,1 $SYSTEM.SYS07.TACL $ZHOME
$Z5NQ X 2,1139 149 001 8,1 /bin/gtacl $ZHOME
$Z4YN 3,9 146 001 8,1 $SYSTEM.SYS07.TACL $ZTN0.#PTB2NV5
$Z5MZ B 3,42 149 001 8,1 $SYSTEM.SYS07.TACL $ZPTY.#ZWN0886
$Z2TJ B 3,201 149 001 8,1 $SYSTEM.SYS07.TACL $ZPTY.#ZWN0882
$SSLS B 3,1014 148 001 8,1 $SYSTEM.SSLPRXY.SSLPRXY $ZPTY.#ZWN0517
$SSFS B 3,1018 148 001 8,1 $SYSTEM.SSLPRXY.SSLFTPS $ZPTY.#ZWN0517
$CAIL 3,1045 145 011 8,1 $SYSTEM.SYS07.TELSERV $ZTN0.#PTB2P0J
C:\Users\andy\Downloads>