Execute My Command via SSH
Set Default Configuration loglevel=TRACE
Open Connection ${IP} prompt=$ timeout=10s
SSHLibrary.Enable Ssh Logging C:\\Apps\\Robot_projects\\toto.txt
${out} SSHLibrary.Login aUser aPass delay=10s
${out} ${out1} ${out2} SSHLibrary.Execute Command pwd return_stdout=True return_rc=True return_stderr=True
[Teardown] SSHLibrary.Close All Connections
The connection is succefull, but executing command fails.
Output Robotframework:
20160105 15:51:49.205 : INFO : Executing command 'pwd'.
20160105 15:51:49.535 : INFO : Command exited with return code 255.
20160105 15:51:49.536 : INFO : ${out} =
20160105 15:51:49.536 : INFO : ${out1} =
20160105 15:51:49.536 : INFO : ${out2} = 255
DEB [20160105-17:33:35.846] thr=1 paramiko.transport: starting thread (client mode): 0x42f5780L
DEB [20160105-17:33:35.848] thr=1 paramiko.transport: Local version/idstring: SSH-2.0-paramiko_1.16.0
DEB [20160105-17:33:35.913] thr=1 paramiko.transport: Remote version/idstring: SSH-2.0-OpenSSH_7.1
INF [20160105-17:33:35.913] thr=1 paramiko.transport: Connected (version 2.0, client OpenSSH_7.1)
DEB [20160105-17:33:35.953] thr=1 paramiko.transport: kex algos:[u'curve255...@libssh.org', u'ecdh-sha2-nistp256', u'ecdh-sha2-nistp384', u'ecdh-sha2-nistp521', u'diffie-hellman-group-exchange-sha256', u'diffie-hellman-group14-sha1'] server key:[u'ssh-rsa', u'ecdsa-sha2-nistp256', u'ssh-ed25519'] client encrypt:[u'chacha20...@openssh.com', u'aes128-ctr', u'aes192-ctr', u'aes256-ctr', u'aes12...@openssh.com', u'aes25...@openssh.com'] server encrypt:[u'chacha20...@openssh.com', u'aes128-ctr', u'aes192-ctr', u'aes256-ctr', u'aes12...@openssh.com', u'aes25...@openssh.com'] client mac:[u'umac-...@openssh.com', u'umac-1...@openssh.com', u'hmac-sha...@openssh.com', u'hmac-sha...@openssh.com', u'hmac-s...@openssh.com', u'uma...@openssh.com', u'umac...@openssh.com', u'hmac-sha2-256', u'hmac-sha2-512', u'hmac-sha1'] server mac:[u'umac-...@openssh.com', u'umac-1...@openssh.com', u'hmac-sha...@openssh.com', u'hmac-sha...@openssh.com', u'hmac-s...@openssh.com', u'uma...@openssh.com', u'umac...@openssh.com', u'hmac-sha2-256', u'hmac-sha2-512', u'hmac-sha1'] client compress:[u'none', u'zl...@openssh.com'] server compress:[u'none', u'zl...@openssh.com'] client lang:[u''] server lang:[u''] kex follows?False DEB [20160105-17:33:35.953] thr=1 paramiko.transport: Kex agreed: diffie-hellman-group14-sha1
DEB [20160105-17:33:35.953] thr=1 paramiko.transport: Cipher agreed: aes128-ctr
DEB [20160105-17:33:35.953] thr=1 paramiko.transport: MAC agreed: hmac-sha2-256
DEB [20160105-17:33:35.953] thr=1 paramiko.transport: Compression agreed: none
DEB [20160105-17:33:36.052] thr=1 paramiko.transport: kex engine KexGroup14 specified hash_algo <built-in function openssl_sha1>
DEB [20160105-17:33:36.052] thr=1 paramiko.transport: Switch to new keys ...
DEB [20160105-17:33:36.055] thr=2 paramiko.transport: Adding ssh-rsa host key for XXXXXX: XXXXXX
DEB [20160105-17:33:36.390] thr=1 paramiko.transport: userauth is OK
INF [20160105-17:33:36.438] thr=1 paramiko.transport: Authentication (password) successful!
DEB [20160105-17:33:36.456] thr=2 paramiko.transport: [chan 0] Max packet in: 32768 bytes
DEB [20160105-17:33:36.493] thr=1 paramiko.transport: Received global request "hostk...@openssh.com" DEB [20160105-17:33:36.493] thr=1 paramiko.transport: Rejecting "hostk...@openssh.com" global request from server. DEB [20160105-17:33:36.726] thr=1 paramiko.transport: [chan 0] Max packet out: 32768 bytes
DEB [20160105-17:33:36.726] thr=1 paramiko.transport: Secsh channel 0 opened.
DEB [20160105-17:33:36.801] thr=1 paramiko.transport: [chan 0] Sesch channel 0 request ok
DEB [20160105-17:33:36.859] thr=1 paramiko.transport: [chan 0] Sesch channel 0 request ok
DEB [20160105-17:33:36.964] thr=2 paramiko.transport: [chan 1] Max packet in: 32768 bytes
DEB [20160105-17:33:37.007] thr=1 paramiko.transport: [chan 1] Max packet out: 32768 bytes
DEB [20160105-17:33:37.007] thr=1 paramiko.transport: Secsh channel 1 opened.
DEB [20160105-17:33:37.094] thr=1 paramiko.transport: [chan 1] Sesch channel 1 request ok
DEB [20160105-17:33:37.095] thr=1 paramiko.transport: [chan 1] EOF received (1)
DEB [20160105-17:33:37.095] thr=1 paramiko.transport: [chan 1] EOF sent (1)
DEB [20160105-17:33:37.107] thr=2 paramiko.transport: [chan 0] EOF sent (0)
DEB [20160105-17:33:37.196] thr=1 paramiko.transport: EOF in transport thread