SSH client in command line mode

Lee, Michael X -ND Michael.X.Lee.-ND@disney.com
Fri, 18 Oct 2002 11:32:42 +0100


Hello,

I am a user of the GPL version of Mindterm 1, and I'm looking to upgrade to the commercial license of Mindterm 2.  

The key functionality for me is the ability to pass the password on the command line (so that I can wrap SSH in an Ant script).  In mindterm 1, I use the following command line to connect to a SSH1 host

"java -jar mindterm.jar --d --h <mindterm.home> -usrname <username> -password <password> -server <host>"

and it takes me straight to a shell on the remote server (In our Ant user we only use SSH to invoke commands on the remote server).

In Mindterm 2, I am trying to achieve the same thing against a SSH2 host, and I am trying to use the following command line

"java -jar mindterm.jar --d --h <mindterm.home> --p none -usrname <username> -password <password> -protocol ssh2 -auth-method password -server <host>"

In this case the password method is the only one that will work.  If I run it with the command line above, I get the following output

"Copyright (c) AppGate 1998-2001, All rights reserved.
This copy of MindTerm is for non-commercial and personal use only. $B"+(J[2KMindTerm home: c:\dev\home\ Initializing random generator, please wait...done
** SSH2Transport : 'peer's version is 'SSH-1.99-OpenSSH_3.1p1'' Connected to server running SSH-1.99-OpenSSH_3.1p1
** SSH2Transport : 'peer kex algorithms: diffie-hellman-group-exchange-sha1,diffie-hellman-group1-sha1'
** SSH2Transport : 'peer host key algorithms: ssh-rsa,ssh-dss'
** SSH2Transport : 'peer enc. alg. cli2srv: aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,arcfour,aes192-cbc,aes256-cbc'
** SSH2Transport : 'peer enc. alg. srv2cli: aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,arcfour,aes192-cbc,aes256-cbc'
** SSH2Transport : 'peer mac alg. cli2srv: hmac-md5,hmac-sha1,hmac-ripemd160,hmac-ripemd160@openssh.com,hmac-sha1-96,hmac-md5-96'
** SSH2Transport : 'peer mac alg. srv2cli: hmac-md5,hmac-sha1,hmac-ripemd160,hmac-ripemd160@openssh.com,hmac-sha1-96,hmac-md5-96'
** SSH2Transport : 'peer comp. alg. cli2srv: none,zlib'
** SSH2Transport : 'peer comp. alg. srv2cli: none,zlib'
** SSH2Transport : 'our kex algorithms: diffie-hellman-group1-sha1,diffie-hellman-group-exchange-sha1'
** SSH2Transport : 'our host key algorithms: ssh-rsa,ssh-dss'
** SSH2Transport : 'our enc. alg. cli2srv: aes128-cbc,blowfish-cbc,twofish128-cbc,aes192-cbc,aes256-cbc,twofish-cbc,cast128-cbc,3des-cbc,arcfour'
** SSH2Transport : 'our enc. alg. srv2cli: aes128-cbc,blowfish-cbc,twofish128-cbc,aes192-cbc,aes256-cbc,twofish-cbc,cast128-cbc,3des-cbc,arcfour'
** SSH2Transport : 'our mac alg. cli2srv: hmac-md5,hmac-sha1,hmac-sha1-96,hmac-md5-96,hmac-ripemd160'
** SSH2Transport : 'our mac alg. srv2cli: hmac-md5,hmac-sha1,hmac-sha1-96,hmac-md5-96,hmac-ripemd160'
** SSH2Transport : 'our comp. alg. cli2srv: none'
** SSH2Transport : 'our comp. alg. srv2cli: none'
** SSH2Transport : 'KEX algorithm chosen: diffie-hellman-group1-sha1'
** SSH2Transport : 'same KEX guessed? false'
** SSH2Transport : 'first KEX follows? false'
** SSH2Transport : 'server's signature verified'

Server's hostkey (ssh-rsa) fingerprint:
openssh md5:  74:89:c6:a9:69:ae:eb:b3:79:7c:de:ee:44:81:6a:8b
bubblebabble: xomap-mavel-hanut-zunug-kavac-cetym-femos-homyv-vylyg-fosoh-fexex

** SSH2Transport : 'new transmitter context (aes128-cbc,hmac-md5,none)'
** SSH2Transport : 'new receiver context (aes128-cbc,hmac-md5,none)'
** SSH2UserAuth : 'server accepted: ssh-userauth'
** SSH2UserAuth : 'failure continuation: publickey,password,keyboard-interactive (partial: false)'
** SSH2UserAuth : 'our remaining methods: password'
** SSH2UserAuth : 'trying method: password'
** SSH2UserAuth : 'successful authentication with password'
** SSH2Channel : 'open confirmation, ch. #0, init-winsz = 0, max-pktsz = 32768'"

$B!D(J but I don't get a shell.

If I run the same command, without the "--d" option, it opens a window, creates a connection to the server and gives me a shell.

Is there something I'm missing here?  We need it to work from the command line.

Thanks, Michael.