简体   繁体   中英

Issue executing SSH command in WAS7


We are using WAS 7.0.41 on Windows Server 2003. We are facing some issue while fetching the directory listing from a remote machine. This issue is only when the command is executed as part of the Java program inside WAS7.0. We get the desired output when the same command is executed from command prompt.

  1. Also while executing the command from the command prompt, the key files are being fetched from a different location compared to Java program in WAS. Why is this difference ?
  2. What needs to be done to resolve this issue in WAS.

Attached are the debug log files from both command prompt and WAS SystemOut.log

Debug log from WAS Systemout:

command: d:/cygwin/bin/ssh -vvv -o LogLevel=DEBUG3 xxxxx@11.205.1.xx ls -lLtp /u003/app/xxxxx/NJFP1PF/../NJFP1PF/sqr
Error line :OpenSSH_6.7p1, OpenSSL 1.0.1j 15 Oct 2014
Error line :debug2: ssh_connect: needpriv 0
Error line :debug1: Connecting to 11.205.1.xx [11.205.1.xx] port 22.
Error line :debug1: Connection established.
Error line :debug1: identity file /.ssh/id_rsa type 1
Error line :debug1: key_load_public: No such file or directory
Error line :debug1: identity file /.ssh/id_rsa-cert type -1
Error line :debug1: key_load_public: No such file or directory
Error line :debug1: identity file /.ssh/id_dsa type -1
Error line :debug1: key_load_public: No such file or directory
Error line :debug1: identity file /.ssh/id_dsa-cert type -1
Error line :debug1: key_load_public: No such file or directory
Error line :debug1: identity file /.ssh/id_ecdsa type -1
Error line :debug1: key_load_public: No such file or directory
Error line :debug1: identity file /.ssh/id_ecdsa-cert type -1
Error line :debug1: key_load_public: No such file or directory
Error line :debug1: identity file /.ssh/id_ed25519 type -1
Error line :debug1: key_load_public: No such file or directory
Error line :debug1: identity file /.ssh/id_ed25519-cert type -1
Error line :debug1: Enabling compatibility mode for protocol 2.0
Error line :debug1: Local version string SSH-2.0-OpenSSH_6.7
Error line :debug1: Remote protocol version 2.0, remote software version OpenSSH_7.5
Error line :debug1: match: OpenSSH_7.5 pat OpenSSH* compat 0x04000000
Error line :debug2: fd 3 setting O_NONBLOCK
Error line :debug3: load_hostkeys: loading entries for host "11.205.1.xx" from file "/.ssh/known_hosts"
Error line :debug3: load_hostkeys: found key type RSA in file /.ssh/known_hosts:3
Error line :debug3: load_hostkeys: loaded 1 keys
Error line :debug3: order_hostkeyalgs: prefer hostkeyalgs: ssh-rsa-cert-v01@openssh.com,ssh-rsa-cert-v00@openssh.com,ssh-rsa
Error line :debug1: SSH2_MSG_KEXINIT sent
Error line :debug1: SSH2_MSG_KEXINIT received
Error line :debug2: kex_parse_kexinit: curve25519-sha256@libssh.org,ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group-exchange-sha256,diffie-hellman-group14-sha1,diffie-hellman-group-exchange-sha1,diffie-hellman-group1-sha1
Error line :debug2: kex_parse_kexinit: ssh-rsa-cert-v01@openssh.com,ssh-rsa-cert-v00@openssh.com,ssh-rsa,ecdsa-sha2-nistp256-cert-v01@openssh.com,ecdsa-sha2-nistp384-cert-v01@openssh.com,ecdsa-sha2-nistp521-cert-v01@openssh.com,ssh-ed25519-cert-v01@openssh.com,ssh-dss-cert-v01@openssh.com,ssh-dss-cert-v00@openssh.com,ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521,ssh-ed25519,ssh-dss
Error line :debug2: kex_parse_kexinit: aes128-ctr,aes192-ctr,aes256-ctr,aes128-gcm@openssh.com,aes256-gcm@openssh.com,chacha20-poly1305@openssh.com,arcfour256,arcfour128,aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,aes192-cbc,aes256-cbc,arcfour,rijndael-cbc@lysator.liu.se
Error line :debug2: kex_parse_kexinit: aes128-ctr,aes192-ctr,aes256-ctr,aes128-gcm@openssh.com,aes256-gcm@openssh.com,chacha20-poly1305@openssh.com,arcfour256,arcfour128,aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,aes192-cbc,aes256-cbc,arcfour,rijndael-cbc@lysator.liu.se
Error line :debug2: kex_parse_kexinit: umac-64-etm@openssh.com,umac-128-etm@openssh.com,hmac-sha2-256-etm@openssh.com,hmac-sha2-512-etm@openssh.com,hmac-sha1-etm@openssh.com,umac-64@openssh.com,umac-128@openssh.com,hmac-sha2-256,hmac-sha2-512,hmac-sha1,hmac-md5-etm@openssh.com,hmac-ripemd160-etm@openssh.com,hmac-sha1-96-etm@openssh.com,hmac-md5-96-etm@openssh.com,hmac-md5,hmac-ripemd160,hmac-ripemd160@openssh.com,hmac-sha1-96,hmac-md5-96
Error line :debug2: kex_parse_kexinit: umac-64-etm@openssh.com,umac-128-etm@openssh.com,hmac-sha2-256-etm@openssh.com,hmac-sha2-512-etm@openssh.com,hmac-sha1-etm@openssh.com,umac-64@openssh.com,umac-128@openssh.com,hmac-sha2-256,hmac-sha2-512,hmac-sha1,hmac-md5-etm@openssh.com,hmac-ripemd160-etm@openssh.com,hmac-sha1-96-etm@openssh.com,hmac-md5-96-etm@openssh.com,hmac-md5,hmac-ripemd160,hmac-ripemd160@openssh.com,hmac-sha1-96,hmac-md5-96
Error line :debug2: kex_parse_kexinit: none,zlib@openssh.com,zlib
Error line :debug2: kex_parse_kexinit: none,zlib@openssh.com,zlib
Error line :debug2: kex_parse_kexinit: 
Error line :debug2: kex_parse_kexinit: 
Error line :debug2: kex_parse_kexinit: first_kex_follows 0 
Error line :debug2: kex_parse_kexinit: reserved 0 
Error line :debug2: kex_parse_kexinit: curve25519-sha256,curve25519-sha256@libssh.org,ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group-exchange-sha256,diffie-hellman-group16-sha512,diffie-hellman-group18-sha512,diffie-hellman-group14-sha256,diffie-hellman-group14-sha1
Error line :debug2: kex_parse_kexinit: ssh-rsa,rsa-sha2-512,rsa-sha2-256,ecdsa-sha2-nistp256,ssh-ed25519
Error line :debug2: kex_parse_kexinit: chacha20-poly1305@openssh.com,aes128-ctr,aes192-ctr,aes256-ctr,aes128-gcm@openssh.com,aes256-gcm@openssh.com
Error line :debug2: kex_parse_kexinit: chacha20-poly1305@openssh.com,aes128-ctr,aes192-ctr,aes256-ctr,aes128-gcm@openssh.com,aes256-gcm@openssh.com
Error line :debug2: kex_parse_kexinit: umac-64-etm@openssh.com,umac-128-etm@openssh.com,hmac-sha2-256-etm@openssh.com,hmac-sha2-512-etm@openssh.com,hmac-sha1-etm@openssh.com,umac-64@openssh.com,umac-128@openssh.com,hmac-sha2-256,hmac-sha2-512,hmac-sha1
Error line :debug2: kex_parse_kexinit: umac-64-etm@openssh.com,umac-128-etm@openssh.com,hmac-sha2-256-etm@openssh.com,hmac-sha2-512-etm@openssh.com,hmac-sha1-etm@openssh.com,umac-64@openssh.com,umac-128@openssh.com,hmac-sha2-256,hmac-sha2-512,hmac-sha1
Error line :debug2: kex_parse_kexinit: none,zlib@openssh.com
Error line :debug2: kex_parse_kexinit: none,zlib@openssh.com
Error line :debug2: kex_parse_kexinit: 
Error line :debug2: kex_parse_kexinit: 
Error line :debug2: kex_parse_kexinit: first_kex_follows 0 
Error line :debug2: kex_parse_kexinit: reserved 0 
Error line :debug2: mac_setup: setup umac-64-etm@openssh.com
Error line :debug1: kex: server->client aes128-ctr umac-64-etm@openssh.com none
Error line :debug2: mac_setup: setup umac-64-etm@openssh.com
Error line :debug1: kex: client->server aes128-ctr umac-64-etm@openssh.com none
Error line :debug1: sending SSH2_MSG_KEX_ECDH_INIT
Error line :debug1: expecting SSH2_MSG_KEX_ECDH_REPLY
Error line :debug1: Server host key: RSA ec:05:04:de:76:f3:b9:64:36:b4:6d:3d:23:48:c4:b4
Error line :debug3: load_hostkeys: loading entries for host "11.205.1.xx" from file "/.ssh/known_hosts"
Error line :debug3: load_hostkeys: found key type RSA in file /.ssh/known_hosts:3
Error line :debug3: load_hostkeys: loaded 1 keys
Error line :debug1: Host '11.205.1.xx' is known and matches the RSA host key.
Error line :debug1: Found key in /.ssh/known_hosts:3
Error line :debug2: kex_derive_keys
Error line :debug2: set_newkeys: mode 1
Error line :debug1: SSH2_MSG_NEWKEYS sent
Error line :debug1: expecting SSH2_MSG_NEWKEYS
Error line :debug2: set_newkeys: mode 0
Error line :debug1: SSH2_MSG_NEWKEYS received
Error line :debug1: Roaming not allowed by server
Error line :debug1: SSH2_MSG_SERVICE_REQUEST sent
Error line :debug2: service_accept: ssh-userauth
Error line :debug1: SSH2_MSG_SERVICE_ACCEPT received
Error line :debug2: key: /.ssh/id_rsa (0x200606e0),
Error line :debug2: key: /.ssh/id_dsa (0x0),
Error line :debug2: key: /.ssh/id_ecdsa (0x0),
Error line :debug2: key: /.ssh/id_ed25519 (0x0),
Error line :debug3: input_userauth_banner
Error line :*******************************************************************************
Error line :*                                                                             *
Error line :* IBM's internal systems must only be used for conducting IBM's business      *
Error line :* or for purposes authorized by IBM management.                               *
Error line :* Use is subject to audit at any time by IBM management                       *
Error line :*                                                                             *
Error line :*******************************************************************************
Error line :
Error line :*******************************************************************************
Error line :*    !! WARNING !! WARNING !! WARNING !! WARNING !! WARNING !! WARNING !!     *
Error line :*                                                                             *
Error line :*      Please make sure you have a SR opened or an approved CSR before        *
Error line :*                 using sudo with any commands on this server                 *
Error line :*                                                                             *
Error line :*******************************************************************************
Error line :debug1: Authentications that can continue: publickey,password,keyboard-interactive
Error line :debug3: start over, passed a different list publickey,password,keyboard-interactive
Error line :debug3: preferred publickey,keyboard-interactive,password
Error line :debug3: authmethod_lookup publickey
Error line :debug3: remaining preferred: keyboard-interactive,password
Error line :debug3: authmethod_is_enabled publickey
Error line :debug1: Next authentication method: publickey
Error line :debug1: Offering RSA public key: /.ssh/id_rsa
Error line :debug3: send_pubkey_test
Error line :debug2: we sent a publickey packet, wait for reply
Error line :debug1: Server accepts key: pkalg ssh-rsa blen 279
Error line :debug2: input_userauth_pk_ok: fp 7d:eb:f7:6f:c8:15:4c:cf:f9:58:5e:b4:a5:ac:76:37
Error line :debug3: sign_and_send_pubkey: RSA 7d:eb:f7:6f:c8:15:4c:cf:f9:58:5e:b4:a5:ac:76:37
Error line :debug1: Authentication succeeded (publickey).
Error line :Authenticated to 11.205.1.xx ([11.205.1.xx]:22).
Error line :debug2: fd 4 setting O_NONBLOCK
Error line :debug2: fd 5 setting O_NONBLOCK
Error line :debug2: fd 6 setting O_NONBLOCK
Error line :debug1: channel 0: new [client-session]
Error line :debug3: ssh_session2_open: channel_new: 0
Error line :debug2: channel 0: send open
Error line :debug1: Requesting no-more-sessions@openssh.com
Error line :debug1: Entering interactive session.
Error line :debug1: client_input_global_request: rtype hostkeys-00@openssh.com want_reply 0
Error line :debug2: callback start
Error line :debug2: fd 3 setting TCP_NODELAY
Error line :debug3: packet_set_tos: set IP_TOS 0x08
Error line :debug2: client_session2_setup: id 0
Error line :debug1: Sending command: ls -lLtp /u003/app/xxxxx/NJFP1PF/../NJFP1PF/sqr
Error line :debug2: channel 0: request exec confirm 1
Error line :debug2: callback done
Error line :debug2: channel 0: open confirm rwindow 0 rmax 32768
Error line :debug2: channel 0: rcvd adjust 2097152
Error line :debug2: channel_input_status_confirm: type 99 id 0
Error line :debug2: exec request accepted on channel 0

Debug Log from Command Prompt :

C:\cygwin\bin>c:/cygwin/bin/ssh -vvv -o LogLevel=DEBUG3 xxxxx@11.205.1.xx ls -lLtp /u003/app/xxxxx/NJFP1PF/../NJFP1PF/sqr
OpenSSH_6.7p1, OpenSSL 1.0.1j 15 Oct 2014
debug2: ssh_connect: needpriv 0
debug1: Connecting to 11.205.1.xx [11.205.1.xx] port 22.
debug1: Connection established.
debug1: identity file /home/isrvceadmin/.ssh/id_rsa type 1
debug1: key_load_public: No such file or directory
debug1: identity file /home/isrvceadmin/.ssh/id_rsa-cert type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/isrvceadmin/.ssh/id_dsa type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/isrvceadmin/.ssh/id_dsa-cert type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/isrvceadmin/.ssh/id_ecdsa type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/isrvceadmin/.ssh/id_ecdsa-cert type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/isrvceadmin/.ssh/id_ed25519 type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/isrvceadmin/.ssh/id_ed25519-cert type -1
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_6.7
debug1: Remote protocol version 2.0, remote software version OpenSSH_7.5
debug1: match: OpenSSH_7.5 pat OpenSSH* compat 0x04000000
debug2: fd 3 setting O_NONBLOCK
debug3: load_hostkeys: loading entries for host "11.205.1.xx" from file "/home/isrvceadmin/.ssh/known_hosts"
debug3: load_hostkeys: found key type RSA in file /home/isrvceadmin/.ssh/known_hosts:3
debug3: load_hostkeys: loaded 1 keys
debug3: order_hostkeyalgs: prefer hostkeyalgs: ssh-rsa-cert-v01@openssh.com,ssh-rsa-cert-v00@openssh.com,ssh-rsa
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug2: kex_parse_kexinit: curve25519-sha256@libssh.org,ecdh-sha2-nistp256,ecdh-sbugha2-nistp384ha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group-exchange-sha256,diffie-hellman-group14-sha1,diffie-hellman-group-exchange-sha1,diffie-hellman-group1-sha1
debug2: kex_parse_kexinit: ssh-rsa-cert-v01@openssh.com,ssh-rsa-cert-v00@openssh.com,ssh-rsa,ecdsa-sha2-nistp256-cert-v01@openssh.com,ecdsa-sha2-nistp384-cert-v01@openssh.com,ecdsa-sha2-nistp521-cert-v01@openssh.com,ssh-ed25519-cert-v01@openssh.com,ssh-dss-cert-v01@openssh.com,ssh-dss-cert-v00@openssh.com,ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521,ssh-ed25519,ssh-dss
debug2: kex_parse_kexinit: aes128-ctr,aes192-ctr,aes256-ctr,aes128-gcm@openssh.com,aes256-gcm@openssh.com,chacha20-poly1305@openssh.com,arcfour256,arcfour128,aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,aes192-cbc,aes256-cbc,arcfour,rijndael-cbc@lysator.liu.se
debug2: kex_parse_kexinit: aes128-ctr,aes192-ctr,aes256-ctr,aes128-gcm@openssh.com,aes256-gcm@openssh.com,chacha20-poly1305@openssh.com,arcfour256,arcfour128,aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,aes192-cbc,aes256-cbc,arcfour,rijndael-cbc@lysator.liu.se
debug2: kex_parse_kexinit: umac-64-etm@openssh.com,umac-128-etm@openssh.com,hmac-sha2-256-etm@openssh.com,hmac-sha2-512-etm@openssh.com,hmac-sha1-etm@openssh.com,umac-64@openssh.com,umac-128@openssh.com,hmac-sha2-256,hmac-sha2-512,hmac-sha1,hmac-md5-etm@openssh.com,hmac-ripemd160-etm@openssh.com,hmac-sha1-96-etm@openssh.com,hmac-md5-96-etm@openssh.com,hmac-md5,hmac-ripemd160,hmac-ripemd160@openssh.com,hmac-sha1-96,hmac-md5-96
debug2: kex_parse_kexinit: umac-64-etm@openssh.com,umac-128-etm@openssh.com,hmac-sha2-256-etm@openssh.com,hmac-sha2-512-etm@openssh.com,hmac-sha1-etm@openssh.com,umac-64@openssh.com,umac-128@openssh.com,hmac-sha2-256,hmac-sha2-512,hmac-sha1,hmac-md5-etm@openssh.com,hmac-ripemd160-etm@openssh.com,hmac-sha1-96-etm@openssh.com,hmac-md5-96-etm@openssh.com,hmac-md5,hmac-ripemd160,hmac-ripemd160@openssh.com,hmac-sha1-96,hmac-md5-96
debug2: kex_parse_kexinit: none,zlib@openssh.com,zlib
debug2: kex_parse_kexinit: none,zlib@openssh.com,zlib
debug2: kex_parse_kexinit:
debug2: kex_parse_kexinit:
debug2: kex_parse_kexinit: first_kex_follows 0
debug2: kex_parse_kexinit: reserved 0
debug2: kex_parse_kexinit: curve25519-sha256,curve25519-sha256@libssh.org,ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group-exchange-sha256,diffie-hellman-group16-sha512,diffie-hellman-group18-sha512,diffie-hellman-group14-sha256,diffie-hellman-group14-sha1
debug2: kex_parse_kexinit: ssh-rsa,rsa-sha2-512,rsa-sha2-256,ecdsa-sha2-nistp256,ssh-ed25519
debug2: kex_parse_kexinit: chacha20-poly1305@openssh.com,aes128-ctr,aes192-ctr,aes256-ctr,aes128-gcm@openssh.com,aes256-gcm@openssh.com
debug2: kex_parse_kexinit: chacha20-poly1305@openssh.com,aes128-ctr,aes192-ctr,aes256-ctr,aes128-gcm@openssh.com,aes256-gcm@openssh.com
debug2: kex_parse_kexinit: umac-64-etm@openssh.com,umac-128-etm@openssh.com,hmac-sha2-256-etm@openssh.com,hmac-sha2-512-etm@openssh.com,hmac-sha1-etm@openssh.com,umac-64@openssh.com,umac-128@openssh.com,hmac-sha2-256,hmac-sha2-512,hmac-sha1
debug2: kex_parse_kexinit: umac-64-etm@openssh.com,umac-128-etm@openssh.com,hmac-sha2-256-etm@openssh.com,hmac-sha2-512-etm@openssh.com,hmac-sha1-etm@openssh.com,umac-64@openssh.com,umac-128@openssh.com,hmac-sha2-256,hmac-sha2-512,hmac-sha1
debug2: kex_parse_kexinit: none,zlib@openssh.com
debug2: kex_parse_kexinit: none,zlib@openssh.com
debug2: kex_parse_kexinit:
debug2: kex_parse_kexinit:
debug2: kex_parse_kexinit: first_kex_follows 0
debug2: kex_parse_kexinit: reserved 0
debug2: mac_setup: setup umac-64-etm@openssh.com
debug1: kex: server->client aes128-ctr umac-64-etm@openssh.com none
debug2: mac_setup: setup umac-64-etm@openssh.com
debug1: kex: client->server aes128-ctr umac-64-etm@openssh.com none
debug1: sending SSH2_MSG_KEX_ECDH_INIT
debug1: expecting SSH2_MSG_KEX_ECDH_REPLY
debug1: Server host key: RSA ec:05:04:de:76:f3:b9:64:36:b4:6d:3d:23:48:c4:b4
debug3: load_hostkeys: loading entries for host "11.205.1.xx" from file "/home/isrvceadmin/.ssh/known_hosts"
debug3: load_hostkeys: found key type RSA in file /home/isrvceadmin/.ssh/known_hosts:3
debug3: load_hostkeys: loaded 1 keys
debug1: Host '11.205.1.xx' is known and matches the RSA host key.
debug1: Found key in /home/isrvceadmin/.ssh/known_hosts:3
debug2: kex_derive_keys
debug2: set_newkeys: mode 1
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug2: set_newkeys: mode 0
debug1: SSH2_MSG_NEWKEYS received
debug1: Roaming not allowed by server
debug1: SSH2_MSG_SERVICE_REQUEST sent
debug2: service_accept: ssh-userauth
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug2: key: /home/isrvceadmin/.ssh/id_rsa (0x2005ee20),
debug2: key: /home/isrvceadmin/.ssh/id_dsa (0x0),
debug2: key: /home/isrvceadmin/.ssh/id_ecdsa (0x0),
debug2: key: /home/isrvceadmin/.ssh/id_ed25519 (0x0),
debug3: input_userauth_banner
*******************************************************************************
*                                                                             *
* IBM's internal systems must only be used for conducting IBM's business      *
* or for purposes authorized by IBM management.                               *
* Use is subject to audit at any time by IBM management                       *
*                                                                             *
*******************************************************************************

*******************************************************************************
*    !! WARNING !! WARNING !! WARNING !! WARNING !! WARNING !! WARNING !!     *
*                                                                             *
*      Please make sure you have a SR opened or an approved CSR before        *
*                 using sudo with any commands on this server                 *
*                                                                             *
*******************************************************************************
debug1: Authentications that can continue: publickey,password,keyboard-interactive
debug3: start over, passed a different list publickey,password,keyboard-interactive
debug3: preferred publickey,keyboard-interactive,password
debug3: authmethod_lookup publickey
debug3: remaining preferred: keyboard-interactive,password
debug3: authmethod_is_enabled publickey
debug1: Next authentication method: publickey
debug1: Offering RSA public key: /home/isrvceadmin/.ssh/id_rsa
debug3: send_pubkey_test
debug2: we sent a publickey packet, wait for reply
debug1: Server accepts key: pkalg ssh-rsa blen 279
debug2: input_userauth_pk_ok: fp 7d:eb:f7:6f:c8:15:4c:cf:f9:58:5e:b4:a5:ac:76:37
debug3: sign_and_send_pubkey: RSA 7d:eb:f7:6f:c8:15:4c:cf:f9:58:5e:b4:a5:ac:76:37
debug1: Authentication succeeded (publickey).
Authenticated to 11.205.1.xx ([11.205.1.xx]:22).
debug2: fd 5 setting O_NONBLOCK
debug1: channel 0: new [client-session]
debug3: ssh_session2_open: channel_new: 0
debug2: channel 0: send open
debug1: Requesting no-more-sessions@openssh.com
debug1: Entering interactive session.
debug1: client_input_global_request: rtype hostkeys-00@openssh.com want_reply 0
debug2: callback start
debug2: fd 3 setting TCP_NODELAY
debug3: packet_set_tos: set IP_TOS 0x08
debug2: client_session2_setup: id 0
debug1: Sending command: ls -lLtp /u003/app/xxxxx/NJFP1PF/../NJFP1PF/sqr
debug2: channel 0: request exec confirm 1
debug2: callback done
debug2: channel 0: open confirm rwindow 0 rmax 32768
debug2: channel 0: rcvd adjust 2097152
debug2: channel_input_status_confirm: type 99 id 0
debug2: exec request accepted on channel 0
debug1: client_input_channel_req: channel 0 rtype exit-status reply 0
debug1: client_input_channel_req: channel 0 rtype eow@openssh.com reply 0
debug2: channel 0: rcvd eow
debug2: channel 0: close_read
debug2: channel 0: input open -> closed
debug2: channel 0: rcvd eof
debug2: channel 0: output open -> drain
debug2: channel 0: rcvd close
debug3: channel 0: will not send data after close
debug3: channel 0: will not send data after close
debug2: channel 0: obuf empty
debug2: channel 0: close_write
debug2: channel 0: output drain -> closed
debug2: channel 0: almost dead
debug2: channel 0: gc: notify user
debug2: channel 0: gc: user detached
debug2: channel 0: send close
debug2: channel 0: is dead
debug2: channel 0: garbage collecting
debug1: channel 0: free: client-session, nchannels 1
debug3: channel 0: status: The following connections are open:
  #0 client-session (t4 r0 i3/0 o3/0 fd -1/-1 cc -1)

debug3: fd 1 is not O_NONBLOCK
Transferred: sent 3348, received 125276 bytes, in 0.3 seconds
Bytes per second: sent 10713.4, received 400875.4
debug1: Exit status 0

I know this is not an answer, but you really should consider moving up. WAS 7 is scheduled to end of support April 2018 [1]. Windows Server 2003 extended support lasted until July 14, 2015 [2].

In both cases, you are authenticating successfully: debug1: Authentication succeeded (publickey). Authenticated to 11.205.1.xx ([11.205.1.xx]:22).

What appears to be happening is that the code running in WAS is getting up to the same point as the console but not all the way. How are you executing an SSH command from within WAS?

To be clear, WAS is not doing this, so its something your application must be doing. What library are you using or are you simply using a shell invocation via something like ProcessBuilder?

[1] https://www-01.ibm.com/software/support/lifecycleapp/PLCDetail.wss?q45=U014343F68568M71 [2] https://en.wikipedia.org/wiki/Windows_Server_2003#Windows_Server_2003_R2

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM