# Talk to lights-out adapters

**URL:** <https://forum.ansible.com/t/talk-to-lights-out-adapters/16083>\
**Category:** Ansible Project\
**Created:** [August 30, 2014, 11:44am UTC](https://forum.ansible.com/t/talk-to-lights-out-adapters/16083 "2014-08-30T11:44:20Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![Frits\_Hoogland](https://avatars.discourse-cdn.com/v4/letter/f/9de0a6/32.png) [@Frits\_Hoogland](https://forum.ansible.com/u/Frits_Hoogland)\
**Post date:** [August 30, 2014, 11:44am UTC](https://forum.ansible.com/t/talk-to-lights-out-adapters/16083/1 "2014-08-30T11:44:20Z")

</div>

I am trying to create a playbook to make lights-out adapters report issues. The lights-out adapter type I have to talk to is sun/oracle ilom. But if this can be made to work, it would probably be usable for any lights-out adapter that is using ssh.

My current playbook looks like this:

---

<div class="post-metadata">

**Author:** ![Henry\_Finucane](https://avatars.discourse-cdn.com/v4/letter/h/94ad74/32.png) [@Henry\_Finucane](https://forum.ansible.com/u/Henry_Finucane)\
**Post date:** [August 30, 2014, 5:35pm UTC](https://forum.ansible.com/t/talk-to-lights-out-adapters/16083/2 "2014-08-30T17:35:32Z")

</div>

Ask, and ye shall receive: [http://docs.ansible.com/raw\_module.html](http://docs.ansible.com/raw_module.html)

---

<div class="post-metadata">

**Author:** ![Frits\_Hoogland](https://avatars.discourse-cdn.com/v4/letter/f/9de0a6/32.png) [@Frits\_Hoogland](https://forum.ansible.com/u/Frits_Hoogland)\
**Post date:** [August 30, 2014, 5:40pm UTC](https://forum.ansible.com/t/talk-to-lights-out-adapters/16083/3 "2014-08-30T17:40:16Z")

</div>

Of course i've looked into the documentation. It might be me, but I couldn't make the error go away.

---

<div class="post-metadata">

**Author:** ![Henry\_Finucane](https://avatars.discourse-cdn.com/v4/letter/h/94ad74/32.png) [@Henry\_Finucane](https://forum.ansible.com/u/Henry_Finucane)\
**Post date:** [August 30, 2014, 6:27pm UTC](https://forum.ansible.com/t/talk-to-lights-out-adapters/16083/4 "2014-08-30T18:27:12Z")

</div>

Sorry, I probably should drink more coffee before talking in public.  
As a control, if you do

ssh root@iloms "show faulty"

If it doesn't, does this work?

echo 'show faulty' | ssh root@iloms

It might be interesting to see -vvvv output, as well.

---

<div class="post-metadata">

**Author:** ![Frits\_Hoogland](https://avatars.discourse-cdn.com/v4/letter/f/9de0a6/32.png) [@Frits\_Hoogland](https://forum.ansible.com/u/Frits_Hoogland)\
**Post date:** [August 31, 2014, 9:19am UTC](https://forum.ansible.com/t/talk-to-lights-out-adapters/16083/5 "2014-08-31T09:19:02Z")

</div>

indeed, that doesn’t work:

> 

> [ansible@ansiblevm ansible]$ ssh root@enkdb01-ilom “show faulty”  
> Password:  
> shell: Invalid credentials

this however, does work:

> [ansible@ansiblevm ansible]$ echo “show faulty” | ssh root@enkdb01-ilom  
> Pseudo-terminal will not be allocated because stdin is not a terminal.  
> Password:
> 
> Oracle(R) Integrated Lights Out Manager
> 
> Version 3.0.16.15.e r87097
> 
> Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
> 
> → show faulty  
> Target | Property | Value  
> --------------------±-----------------------±--------------------------------
> 
> → Session closed

This is ssh -vvvv root@enkdb01-ilom “show faulty”:

> [ansible@ansiblevm ansible]$ ssh -vvvv root@enkdb01-ilom “show faulty”
> 
> OpenSSH\_5.3p1, OpenSSL 1.0.1e-fips 11 Feb 2013
> 
> debug1: Reading configuration data /etc/ssh/ssh\_config
> 
> debug1: Applying options for \*
> 
> debug2: ssh\_connect: needpriv 0
> 
> debug1: Connecting to enkdb01-ilom [192.168.8.206] port 22.
> 
> debug1: Connection established.
> 
> debug1: identity file /home/ansible/.ssh/identity type -1
> 
> debug1: identity file /home/ansible/.ssh/identity-cert type -1
> 
> debug3: Not a RSA1 key file /home/ansible/.ssh/id\_rsa.
> 
> debug2: key\_type\_from\_name: unknown key type ‘-----BEGIN’
> 
> debug3: key\_read: missing keytype
> 
> debug3: key\_read: missing whitespace
> 
> debug3: key\_read: missing whitespace
> 
> debug3: key\_read: missing whitespace
> 
> debug3: key\_read: missing whitespace
> 
> debug3: key\_read: missing whitespace
> 
> debug3: key\_read: missing whitespace
> 
> debug3: key\_read: missing whitespace
> 
> debug3: key\_read: missing whitespace
> 
> debug3: key\_read: missing whitespace
> 
> debug3: key\_read: missing whitespace
> 
> debug3: key\_read: missing whitespace
> 
> debug3: key\_read: missing whitespace
> 
> debug3: key\_read: missing whitespace
> 
> debug3: key\_read: missing whitespace
> 
> debug3: key\_read: missing whitespace
> 
> debug3: key\_read: missing whitespace
> 
> debug3: key\_read: missing whitespace
> 
> debug3: key\_read: missing whitespace
> 
> debug3: key\_read: missing whitespace
> 
> debug3: key\_read: missing whitespace
> 
> debug3: key\_read: missing whitespace
> 
> debug3: key\_read: missing whitespace
> 
> debug3: key\_read: missing whitespace
> 
> debug3: key\_read: missing whitespace
> 
> debug3: key\_read: missing whitespace
> 
> debug2: key\_type\_from\_name: unknown key type ‘-----END’
> 
> debug3: key\_read: missing keytype
> 
> debug1: identity file /home/ansible/.ssh/id\_rsa type 1
> 
> debug1: identity file /home/ansible/.ssh/id\_rsa-cert type -1
> 
> debug1: identity file /home/ansible/.ssh/id\_dsa type -1
> 
> debug1: identity file /home/ansible/.ssh/id\_dsa-cert type -1
> 
> debug1: Remote protocol version 2.0, remote software version OpenSSH\_5.1
> 
> debug1: match: OpenSSH\_5.1 pat OpenSSH\*
> 
> debug1: Enabling compatibility mode for protocol 2.0
> 
> debug1: Local version string SSH-2.0-OpenSSH\_5.3
> 
> debug2: fd 3 setting O\_NONBLOCK
> 
> debug1: SSH2\_MSG\_KEXINIT sent
> 
> debug3: Wrote 960 bytes for a total of 981
> 
> debug1: SSH2\_MSG\_KEXINIT received
> 
> debug2: kex\_parse\_kexinit: diffie-hellman-group-exchange-sha256,diffie-hellman-group-exchange-sha1,diffie-hellman-group14-sha1,diffie-hellman-group1-sha1
> 
> debug2: kex\_parse\_kexinit: [ssh-rsa-cert-v01@openssh.com](mailto:ssh-rsa-cert-v01@openssh.com),ssh-dss-cert-v01@openssh.com,ssh-rsa-cert-v00@openssh.com,ssh-dss-cert-v00@openssh.com,ssh-rsa,ssh-dss
> 
> debug2: kex\_parse\_kexinit: aes128-ctr,aes192-ctr,aes256-ctr,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,arcfour256,arcfour128,aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,aes192-cbc,aes256-cbc,arcfour,rijndael-cbc@lysator.liu.se
> 
> debug2: kex\_parse\_kexinit: [hmac-md5,hmac-sha1,umac-64@openssh.com](mailto:hmac-md5,hmac-sha1,umac-64@openssh.com),hmac-sha2-256,hmac-sha2-512,hmac-ripemd160,hmac-ripemd160@openssh.com,hmac-sha1-96,hmac-md5-96
> 
> debug2: kex\_parse\_kexinit: [hmac-md5,hmac-sha1,umac-64@openssh.com](mailto:hmac-md5,hmac-sha1,umac-64@openssh.com),hmac-sha2-256,hmac-sha2-512,hmac-ripemd160,hmac-ripemd160@openssh.com,hmac-sha1-96,hmac-md5-96
> 
> debug2: kex\_parse\_kexinit: [none,zlib@openssh.com](mailto:none,zlib@openssh.com),zlib
> 
> debug2: kex\_parse\_kexinit: [none,zlib@openssh.com](mailto: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: diffie-hellman-group-exchange-sha256,diffie-hellman-group-exchange-sha1,diffie-hellman-group14-sha1,diffie-hellman-group1-sha1
> 
> debug2: kex\_parse\_kexinit: ssh-rsa,ssh-dss
> 
> debug2: kex\_parse\_kexinit: aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,arcfour128,arcfour256,arcfour,aes192-cbc,aes256-cbc,rijndael-cbc@lysator.liu.se,aes128-ctr,aes192-ctr,aes256-ctr
> 
> debug2: kex\_parse\_kexinit: aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,arcfour128,arcfour256,arcfour,aes192-cbc,aes256-cbc,rijndael-cbc@lysator.liu.se,aes128-ctr,aes192-ctr,aes256-ctr
> 
> debug2: kex\_parse\_kexinit: [hmac-md5,hmac-sha1,umac-64@openssh.com](mailto:hmac-md5,hmac-sha1,umac-64@openssh.com),hmac-ripemd160,hmac-ripemd160@openssh.com,hmac-sha1-96,hmac-md5-96
> 
> debug2: kex\_parse\_kexinit: [hmac-md5,hmac-sha1,umac-64@openssh.com](mailto:hmac-md5,hmac-sha1,umac-64@openssh.com),hmac-ripemd160,hmac-ripemd160@openssh.com,hmac-sha1-96,hmac-md5-96
> 
> debug2: kex\_parse\_kexinit: [none,zlib@openssh.com](mailto:none,zlib@openssh.com)
> 
> debug2: kex\_parse\_kexinit: [none,zlib@openssh.com](mailto: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: found hmac-md5
> 
> debug1: kex: server-\>client aes128-ctr hmac-md5 none
> 
> debug2: mac\_setup: found hmac-md5
> 
> debug1: kex: client-\>server aes128-ctr hmac-md5 none
> 
> debug1: SSH2\_MSG\_KEX\_DH\_GEX\_REQUEST(1024\<1024\<8192) sent
> 
> debug1: expecting SSH2\_MSG\_KEX\_DH\_GEX\_GROUP
> 
> debug3: Wrote 24 bytes for a total of 1005
> 
> debug2: dh\_gen\_key: priv key bits set: 129/256
> 
> debug2: bits set: 525/1024
> 
> debug1: SSH2\_MSG\_KEX\_DH\_GEX\_INIT sent
> 
> debug1: expecting SSH2\_MSG\_KEX\_DH\_GEX\_REPLY
> 
> debug3: Wrote 144 bytes for a total of 1149
> 
> debug3: check\_host\_in\_hostfile: host enkdb01-ilom filename /home/ansible/.ssh/known\_hosts
> 
> debug3: check\_host\_in\_hostfile: host enkdb01-ilom filename /home/ansible/.ssh/known\_hosts
> 
> debug3: check\_host\_in\_hostfile: match line 6
> 
> debug3: check\_host\_in\_hostfile: host 192.168.8.206 filename /home/ansible/.ssh/known\_hosts
> 
> debug3: check\_host\_in\_hostfile: host 192.168.8.206 filename /home/ansible/.ssh/known\_hosts
> 
> debug3: check\_host\_in\_hostfile: match line 8
> 
> debug1: Host ‘enkdb01-ilom’ is known and matches the RSA host key.
> 
> debug1: Found key in /home/ansible/.ssh/known\_hosts:6
> 
> debug2: bits set: 505/1024
> 
> debug1: ssh\_rsa\_verify: signature correct
> 
> debug2: kex\_derive\_keys
> 
> debug2: set\_newkeys: mode 1
> 
> debug1: SSH2\_MSG\_NEWKEYS sent
> 
> debug1: expecting SSH2\_MSG\_NEWKEYS
> 
> debug3: Wrote 16 bytes for a total of 1165
> 
> debug2: set\_newkeys: mode 0
> 
> debug1: SSH2\_MSG\_NEWKEYS received
> 
> debug1: SSH2\_MSG\_SERVICE\_REQUEST sent
> 
> debug3: Wrote 48 bytes for a total of 1213
> 
> debug2: service\_accept: ssh-userauth
> 
> debug1: SSH2\_MSG\_SERVICE\_ACCEPT received
> 
> debug2: key: /home/ansible/.ssh/identity ((nil))
> 
> debug2: key: /home/ansible/.ssh/id\_rsa (0x7f4fa7d33f10)
> 
> debug2: key: /home/ansible/.ssh/id\_dsa ((nil))
> 
> debug3: Wrote 64 bytes for a total of 1277
> 
> debug1: Authentications that can continue: publickey,keyboard-interactive
> 
> debug3: start over, passed a different list publickey,keyboard-interactive
> 
> debug3: preferred gssapi-keyex,gssapi-with-mic,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: Trying private key: /home/ansible/.ssh/identity
> 
> debug3: no such identity: /home/ansible/.ssh/identity
> 
> debug1: Offering public key: /home/ansible/.ssh/id\_rsa
> 
> debug3: send\_pubkey\_test
> 
> debug2: we sent a publickey packet, wait for reply
> 
> debug3: Wrote 368 bytes for a total of 1645
> 
> debug1: Authentications that can continue: publickey,keyboard-interactive
> 
> debug1: Trying private key: /home/ansible/.ssh/id\_dsa
> 
> debug3: no such identity: /home/ansible/.ssh/id\_dsa
> 
> debug2: we did not send a packet, disable method
> 
> debug3: authmethod\_lookup keyboard-interactive
> 
> debug3: remaining preferred: password
> 
> debug3: authmethod\_is\_enabled keyboard-interactive
> 
> debug1: Next authentication method: keyboard-interactive
> 
> debug2: userauth\_kbdint
> 
> debug2: we sent a keyboard-interactive packet, wait for reply
> 
> debug3: Wrote 96 bytes for a total of 1741
> 
> debug2: input\_userauth\_info\_req
> 
> debug2: input\_userauth\_info\_req: num\_prompts 1
> 
> Password:
> 
> debug3: packet\_send2: adding 32 (len 22 padlen 10 extra\_pad 64)
> 
> debug3: Wrote 80 bytes for a total of 1821
> 
> debug2: input\_userauth\_info\_req
> 
> debug2: input\_userauth\_info\_req: num\_prompts 0
> 
> debug3: packet\_send2: adding 48 (len 10 padlen 6 extra\_pad 64)
> 
> debug3: Wrote 80 bytes for a total of 1901
> 
> debug1: Authentication succeeded (keyboard-interactive).
> 
> 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](mailto:no-more-sessions@openssh.com)
> 
> debug1: Entering interactive session.
> 
> debug3: Wrote 128 bytes for a total of 2029
> 
> debug2: callback start
> 
> debug2: client\_session2\_setup: id 0
> 
> debug1: Sending environment.
> 
> debug3: Ignored env HOSTNAME
> 
> debug3: Ignored env SELINUX\_ROLE\_REQUESTED
> 
> debug3: Ignored env ANSIBLE\_SSH\_ARGS
> 
> debug3: Ignored env TERM
> 
> debug3: Ignored env SHELL
> 
> debug3: Ignored env HISTSIZE
> 
> debug3: Ignored env SSH\_CLIENT
> 
> debug3: Ignored env SELINUX\_USE\_CURRENT\_RANGE
> 
> debug3: Ignored env QTDIR
> 
> debug3: Ignored env OLDPWD
> 
> debug3: Ignored env QTINC
> 
> debug3: Ignored env SSH\_TTY
> 
> debug3: Ignored env USER
> 
> debug3: Ignored env LS\_COLORS
> 
> debug3: Ignored env MAIL
> 
> debug3: Ignored env PATH
> 
> debug3: Ignored env PWD
> 
> debug1: Sending env LANG = en\_US.UTF-8
> 
> debug2: channel 0: request env confirm 0
> 
> debug3: Ignored env SELINUX\_LEVEL\_REQUESTED
> 
> debug3: Ignored env HISTCONTROL
> 
> debug3: Ignored env SHLVL
> 
> debug3: Ignored env HOME
> 
> debug3: Ignored env LOGNAME
> 
> debug3: Ignored env QTLIB
> 
> debug3: Ignored env CVS\_RSH
> 
> debug3: Ignored env SSH\_CONNECTION
> 
> debug3: Ignored env LESSOPEN
> 
> debug3: Ignored env G\_BROKEN\_FILENAMES
> 
> debug3: Ignored env \_
> 
> debug1: Sending command: show faulty
> 
> debug2: channel 0: request exec confirm 1
> 
> debug2: fd 3 setting TCP\_NODELAY
> 
> debug2: callback done
> 
> debug2: channel 0: open confirm rwindow 0 rmax 32768
> 
> debug3: Wrote 128 bytes for a total of 2157
> 
> debug2: channel 0: rcvd adjust 2097152
> 
> debug2: channel\_input\_status\_confirm: type 99 id 0
> 
> debug2: exec request accepted on channel 0
> 
> shell: Invalid credentials
> 
> debug2: channel 0: rcvd eof
> 
> debug2: channel 0: output open → drain
> 
> debug2: channel 0: obuf empty
> 
> debug2: channel 0: close\_write
> 
> debug2: channel 0: output drain → closed
> 
> debug1: client\_input\_channel\_req: channel 0 rtype exit-status reply 0
> 
> debug1: client\_input\_channel\_req: channel 0 rtype [eow@openssh.com](mailto: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 close
> 
> debug3: channel 0: will not send data after close
> 
> 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 cfd -1)
> 
> debug3: channel 0: close\_fds r -1 w -1 e 6 c -1
> 
> debug3: Wrote 32 bytes for a total of 2189
> 
> debug3: Wrote 64 bytes for a total of 2253
> 
> Transferred: sent 2040, received 1912 bytes, in 0.5 seconds
> 
> Bytes per second: sent 3861.5, received 3619.3
> 
> debug1: Exit status 0

And this is echo “show fault” | ssh -vvvv root@enkdb01-ilom:

> [ansible@ansiblevm ansible]$ echo “show faulty” | ssh -vvvv root@enkdb01-ilom  
> OpenSSH\_5.3p1, OpenSSL 1.0.1e-fips 11 Feb 2013  
> Pseudo-terminal will not be allocated because stdin is not a terminal.  
> debug1: Reading configuration data /etc/ssh/ssh\_config  
> debug1: Applying options for \*  
> debug2: ssh\_connect: needpriv 0  
> debug1: Connecting to enkdb01-ilom [192.168.8.206] port 22.  
> debug1: Connection established.  
> debug1: identity file /home/ansible/.ssh/identity type -1  
> debug1: identity file /home/ansible/.ssh/identity-cert type -1  
> debug3: Not a RSA1 key file /home/ansible/.ssh/id\_rsa.  
> debug2: key\_type\_from\_name: unknown key type ‘-----BEGIN’  
> debug3: key\_read: missing keytype  
> debug3: key\_read: missing whitespace  
> debug3: key\_read: missing whitespace  
> debug3: key\_read: missing whitespace  
> debug3: key\_read: missing whitespace  
> debug3: key\_read: missing whitespace  
> debug3: key\_read: missing whitespace  
> debug3: key\_read: missing whitespace  
> debug3: key\_read: missing whitespace  
> debug3: key\_read: missing whitespace  
> debug3: key\_read: missing whitespace  
> debug3: key\_read: missing whitespace  
> debug3: key\_read: missing whitespace  
> debug3: key\_read: missing whitespace  
> debug3: key\_read: missing whitespace  
> debug3: key\_read: missing whitespace  
> debug3: key\_read: missing whitespace  
> debug3: key\_read: missing whitespace  
> debug3: key\_read: missing whitespace  
> debug3: key\_read: missing whitespace  
> debug3: key\_read: missing whitespace  
> debug3: key\_read: missing whitespace  
> debug3: key\_read: missing whitespace  
> debug3: key\_read: missing whitespace  
> debug3: key\_read: missing whitespace  
> debug3: key\_read: missing whitespace  
> debug2: key\_type\_from\_name: unknown key type ‘-----END’  
> debug3: key\_read: missing keytype  
> debug1: identity file /home/ansible/.ssh/id\_rsa type 1  
> debug1: identity file /home/ansible/.ssh/id\_rsa-cert type -1  
> debug1: identity file /home/ansible/.ssh/id\_dsa type -1  
> debug1: identity file /home/ansible/.ssh/id\_dsa-cert type -1  
> debug1: Remote protocol version 2.0, remote software version OpenSSH\_5.1  
> debug1: match: OpenSSH\_5.1 pat OpenSSH\*  
> debug1: Enabling compatibility mode for protocol 2.0  
> debug1: Local version string SSH-2.0-OpenSSH\_5.3  
> debug2: fd 3 setting O\_NONBLOCK  
> debug1: SSH2\_MSG\_KEXINIT sent  
> debug3: Wrote 960 bytes for a total of 981  
> debug1: SSH2\_MSG\_KEXINIT received  
> debug2: kex\_parse\_kexinit: diffie-hellman-group-exchange-sha256,diffie-hellman-group-exchange-sha1,diffie-hellman-group14-sha1,diffie-hellman-group1-sha1  
> debug2: kex\_parse\_kexinit: [ssh-rsa-cert-v01@openssh.com](mailto:ssh-rsa-cert-v01@openssh.com),ssh-dss-cert-v01@openssh.com,ssh-rsa-cert-v00@openssh.com,ssh-dss-cert-v00@openssh.com,ssh-rsa,ssh-dss  
> debug2: kex\_parse\_kexinit: aes128-ctr,aes192-ctr,aes256-ctr,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,arcfour256,arcfour128,aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,aes192-cbc,aes256-cbc,arcfour,rijndael-cbc@lysator.liu.se  
> debug2: kex\_parse\_kexinit: [hmac-md5,hmac-sha1,umac-64@openssh.com](mailto:hmac-md5,hmac-sha1,umac-64@openssh.com),hmac-sha2-256,hmac-sha2-512,hmac-ripemd160,hmac-ripemd160@openssh.com,hmac-sha1-96,hmac-md5-96  
> debug2: kex\_parse\_kexinit: [hmac-md5,hmac-sha1,umac-64@openssh.com](mailto:hmac-md5,hmac-sha1,umac-64@openssh.com),hmac-sha2-256,hmac-sha2-512,hmac-ripemd160,hmac-ripemd160@openssh.com,hmac-sha1-96,hmac-md5-96  
> debug2: kex\_parse\_kexinit: [none,zlib@openssh.com](mailto:none,zlib@openssh.com),zlib  
> debug2: kex\_parse\_kexinit: [none,zlib@openssh.com](mailto: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: diffie-hellman-group-exchange-sha256,diffie-hellman-group-exchange-sha1,diffie-hellman-group14-sha1,diffie-hellman-group1-sha1  
> debug2: kex\_parse\_kexinit: ssh-rsa,ssh-dss  
> debug2: kex\_parse\_kexinit: aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,arcfour128,arcfour256,arcfour,aes192-cbc,aes256-cbc,rijndael-cbc@lysator.liu.se,aes128-ctr,aes192-ctr,aes256-ctr  
> debug2: kex\_parse\_kexinit: aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,arcfour128,arcfour256,arcfour,aes192-cbc,aes256-cbc,rijndael-cbc@lysator.liu.se,aes128-ctr,aes192-ctr,aes256-ctr  
> debug2: kex\_parse\_kexinit: [hmac-md5,hmac-sha1,umac-64@openssh.com](mailto:hmac-md5,hmac-sha1,umac-64@openssh.com),hmac-ripemd160,hmac-ripemd160@openssh.com,hmac-sha1-96,hmac-md5-96  
> debug2: kex\_parse\_kexinit: [hmac-md5,hmac-sha1,umac-64@openssh.com](mailto:hmac-md5,hmac-sha1,umac-64@openssh.com),hmac-ripemd160,hmac-ripemd160@openssh.com,hmac-sha1-96,hmac-md5-96  
> debug2: kex\_parse\_kexinit: [none,zlib@openssh.com](mailto:none,zlib@openssh.com)  
> debug2: kex\_parse\_kexinit: [none,zlib@openssh.com](mailto: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: found hmac-md5  
> debug1: kex: server-\>client aes128-ctr hmac-md5 none  
> debug2: mac\_setup: found hmac-md5  
> debug1: kex: client-\>server aes128-ctr hmac-md5 none  
> debug1: SSH2\_MSG\_KEX\_DH\_GEX\_REQUEST(1024\<1024\<8192) sent  
> debug1: expecting SSH2\_MSG\_KEX\_DH\_GEX\_GROUP  
> debug3: Wrote 24 bytes for a total of 1005  
> debug2: dh\_gen\_key: priv key bits set: 119/256  
> debug2: bits set: 503/1024  
> debug1: SSH2\_MSG\_KEX\_DH\_GEX\_INIT sent  
> debug1: expecting SSH2\_MSG\_KEX\_DH\_GEX\_REPLY  
> debug3: Wrote 144 bytes for a total of 1149  
> debug3: check\_host\_in\_hostfile: host enkdb01-ilom filename /home/ansible/.ssh/known\_hosts  
> debug3: check\_host\_in\_hostfile: host enkdb01-ilom filename /home/ansible/.ssh/known\_hosts  
> debug3: check\_host\_in\_hostfile: match line 6  
> debug3: check\_host\_in\_hostfile: host 192.168.8.206 filename /home/ansible/.ssh/known\_hosts  
> debug3: check\_host\_in\_hostfile: host 192.168.8.206 filename /home/ansible/.ssh/known\_hosts  
> debug3: check\_host\_in\_hostfile: match line 8  
> debug1: Host ‘enkdb01-ilom’ is known and matches the RSA host key.  
> debug1: Found key in /home/ansible/.ssh/known\_hosts:6  
> debug2: bits set: 499/1024  
> debug1: ssh\_rsa\_verify: signature correct  
> debug2: kex\_derive\_keys  
> debug2: set\_newkeys: mode 1  
> debug1: SSH2\_MSG\_NEWKEYS sent  
> debug1: expecting SSH2\_MSG\_NEWKEYS  
> debug3: Wrote 16 bytes for a total of 1165  
> debug2: set\_newkeys: mode 0  
> debug1: SSH2\_MSG\_NEWKEYS received  
> debug1: SSH2\_MSG\_SERVICE\_REQUEST sent  
> debug3: Wrote 48 bytes for a total of 1213  
> debug2: service\_accept: ssh-userauth  
> debug1: SSH2\_MSG\_SERVICE\_ACCEPT received  
> debug2: key: /home/ansible/.ssh/identity ((nil))  
> debug2: key: /home/ansible/.ssh/id\_rsa (0x7fa50b3cff10)  
> debug2: key: /home/ansible/.ssh/id\_dsa ((nil))  
> debug3: Wrote 64 bytes for a total of 1277  
> debug1: Authentications that can continue: publickey,keyboard-interactive  
> debug3: start over, passed a different list publickey,keyboard-interactive  
> debug3: preferred gssapi-keyex,gssapi-with-mic,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: Trying private key: /home/ansible/.ssh/identity  
> debug3: no such identity: /home/ansible/.ssh/identity  
> debug1: Offering public key: /home/ansible/.ssh/id\_rsa  
> debug3: send\_pubkey\_test  
> debug2: we sent a publickey packet, wait for reply  
> debug3: Wrote 368 bytes for a total of 1645  
> debug1: Authentications that can continue: publickey,keyboard-interactive  
> debug1: Trying private key: /home/ansible/.ssh/id\_dsa  
> debug3: no such identity: /home/ansible/.ssh/id\_dsa  
> debug2: we did not send a packet, disable method  
> debug3: authmethod\_lookup keyboard-interactive  
> debug3: remaining preferred: password  
> debug3: authmethod\_is\_enabled keyboard-interactive  
> debug1: Next authentication method: keyboard-interactive  
> debug2: userauth\_kbdint  
> debug2: we sent a keyboard-interactive packet, wait for reply  
> debug3: Wrote 96 bytes for a total of 1741  
> debug2: input\_userauth\_info\_req  
> debug2: input\_userauth\_info\_req: num\_prompts 1  
> Password:  
> debug3: packet\_send2: adding 32 (len 22 padlen 10 extra\_pad 64)  
> debug3: Wrote 80 bytes for a total of 1821  
> debug2: input\_userauth\_info\_req  
> debug2: input\_userauth\_info\_req: num\_prompts 0  
> debug3: packet\_send2: adding 48 (len 10 padlen 6 extra\_pad 64)  
> debug3: Wrote 80 bytes for a total of 1901  
> debug1: Authentication succeeded (keyboard-interactive).  
> debug2: fd 4 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](mailto:no-more-sessions@openssh.com)  
> debug1: Entering interactive session.  
> debug3: Wrote 128 bytes for a total of 2029  
> debug2: callback start  
> debug2: client\_session2\_setup: id 0  
> debug1: Sending environment.  
> debug3: Ignored env HOSTNAME  
> debug3: Ignored env SELINUX\_ROLE\_REQUESTED  
> debug3: Ignored env ANSIBLE\_SSH\_ARGS  
> debug3: Ignored env TERM  
> debug3: Ignored env SHELL  
> debug3: Ignored env HISTSIZE  
> debug3: Ignored env SSH\_CLIENT  
> debug3: Ignored env SELINUX\_USE\_CURRENT\_RANGE  
> debug3: Ignored env QTDIR  
> debug3: Ignored env OLDPWD  
> debug3: Ignored env QTINC  
> debug3: Ignored env SSH\_TTY  
> debug3: Ignored env USER  
> debug3: Ignored env LS\_COLORS  
> debug3: Ignored env MAIL  
> debug3: Ignored env PATH  
> debug3: Ignored env PWD  
> debug1: Sending env LANG = en\_US.UTF-8  
> debug2: channel 0: request env confirm 0  
> debug3: Ignored env SELINUX\_LEVEL\_REQUESTED  
> debug3: Ignored env HISTCONTROL  
> debug3: Ignored env SHLVL  
> debug3: Ignored env HOME  
> debug3: Ignored env LOGNAME  
> debug3: Ignored env QTLIB  
> debug3: Ignored env CVS\_RSH  
> debug3: Ignored env SSH\_CONNECTION  
> debug3: Ignored env LESSOPEN  
> debug3: Ignored env G\_BROKEN\_FILENAMES  
> debug3: Ignored env \_  
> debug2: channel 0: request shell confirm 1  
> debug2: fd 3 setting TCP\_NODELAY  
> debug2: callback done  
> debug2: channel 0: open confirm rwindow 0 rmax 32768  
> debug3: Wrote 112 bytes for a total of 2141  
> debug2: channel 0: rcvd adjust 2097152  
> debug2: channel\_input\_status\_confirm: type 99 id 0  
> debug2: shell request accepted on channel 0  
> debug2: channel 0: read\<=0 rfd 4 len 0  
> debug2: channel 0: read failed  
> debug2: channel 0: close\_read  
> debug2: channel 0: input open → drain  
> debug3: Wrote 48 bytes for a total of 2189  
> debug2: channel 0: ibuf empty  
> debug2: channel 0: send eof  
> debug2: channel 0: input drain → closed  
> debug3: Wrote 32 bytes for a total of 2221
> 
> Oracle(R) Integrated Lights Out Manager
> 
> Version 3.0.16.15.e r87097
> 
> Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
> 
> → sdebug2: channel 0: rcvd eof  
> debug2: channel 0: output open → drain  
> debug1: client\_input\_channel\_req: channel 0 rtype exit-status reply 0  
> debug2: channel 0: rcvd close  
> debug3: channel 0: will not send data after close  
> debug1: channel 0: forcing write  
> how faulty  
> Target | Property | Value  
> --------------------±-----------------------±--------------------------------
> 
> → Session closed  
> 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 cfd -1)
> 
> debug3: channel 0: close\_fds r -1 w -1 e 6 c -1  
> debug3: Wrote 32 bytes for a total of 2253  
> debug3: Wrote 64 bytes for a total of 2317  
> debug1: fd 0 clearing O\_NONBLOCK  
> Transferred: sent 2072, received 2696 bytes, in 0.8 seconds  
> Bytes per second: sent 2565.8, received 3338.6  
> debug1: Exit status 0

Oh, to make the information more complete, the ansible host is Oracle Linux 6u5 x86\_64, updated to the newest public available packages. The EPEL repo is added, and ansible is installed from there. This means ansible is version 1.6.6.

---

<div class="post-metadata">

**Author:** ![Frits\_Hoogland](https://avatars.discourse-cdn.com/v4/letter/f/9de0a6/32.png) [@Frits\_Hoogland](https://forum.ansible.com/u/Frits_Hoogland)\
**Post date:** [August 31, 2014, 11:40am UTC](https://forum.ansible.com/t/talk-to-lights-out-adapters/16083/6 "2014-08-31T11:40:01Z")

</div>

Searching and researching this topic, it seems that this issue has been raised on several places. Still, I haven’t seen a resolution yet.

It seems that this problem arises whenever you try to make Ansible talk to a machine that has it’s own shell behind ssh. It’s my personal opinion that Ansible would become more valuable if you can make it talk to these kind of devices, like cisco routers and ILO cards, for change orchestration.

---

<div class="post-metadata">

**Author:** ![Frits\_Hoogland](https://avatars.discourse-cdn.com/v4/letter/f/9de0a6/32.png) [@Frits\_Hoogland](https://forum.ansible.com/u/Frits_Hoogland)\
**Post date:** [September 3, 2014, 11:41am UTC](https://forum.ansible.com/t/talk-to-lights-out-adapters/16083/7 "2014-09-03T11:41:40Z")

</div>

Anyone else interested in looking into this issue?

---

<div class="post-metadata">

**Author:** ![Michael\_DeHaan1](https://avatars.discourse-cdn.com/v4/letter/m/5e9695/32.png) [@Michael\_DeHaan1](https://forum.ansible.com/u/Michael_DeHaan1)\
**Post date:** [September 3, 2014, 11:45am UTC](https://forum.ansible.com/t/talk-to-lights-out-adapters/16083/8 "2014-09-03T11:45:27Z")

</div>

I don’t think it’s an issue so much as a feature request - though it doesn’t seem like there are, given lack of response to this email thread.

I will say connections in ansible aren’t meant to talk to non-computers, and in many cases, this may be something that needs to write a module to talk to them, similar to what we do with various load balancers.

There was a recent thread about HP switches and not really having a shell when you login that’s the same kind of thing.

Most folks are using ILO’s for basic power management via fence and haven’t automated a lot more.

Anyway, a module is probably appropriate, though we are probably unlikely to include it in core if the goal is to simulate a monitoring system.

---

<div class="post-metadata">

**Author:** ![Frits\_Hoogland](https://avatars.discourse-cdn.com/v4/letter/f/9de0a6/32.png) [@Frits\_Hoogland](https://forum.ansible.com/u/Frits_Hoogland)\
**Post date:** [September 3, 2014, 11:57am UTC](https://forum.ansible.com/t/talk-to-lights-out-adapters/16083/9 "2014-09-03T11:57:47Z")

</div>

I am actually quite surprised by the lack of response.

When using Ansible for implementing changes across systems, I can’t help to think you want to talk to network devices and alter rules? Also, when doing operating system and hardware updates, you want to talk to the BMC, for which the ssh port is the most reliable way!

I’ve gone through researching, and actually this seems to be a question/feature request that pops up reasonably frequently at different places.

When seen as a feature request, it would be to implement a mode in the raw module, which makes raw to just log on, and issues a command and reads the output, instead of requesting a shell. mode=shell or plain.

In my opinion adding a raw plain mode would open up access to a lot of devices which are inherently unreachable by other orchestration engines because they require an agent. The magic is in the fact that you can issue any command to the device, instead of writing a module specifically for a specific device.

Cheers,

Frits

---

<div class="post-metadata">

**Author:** ![Michael\_DeHaan1](https://avatars.discourse-cdn.com/v4/letter/m/5e9695/32.png) [@Michael\_DeHaan1](https://forum.ansible.com/u/Michael_DeHaan1)\
**Post date:** [September 3, 2014, 12:47pm UTC](https://forum.ansible.com/t/talk-to-lights-out-adapters/16083/10 "2014-09-03T12:47:02Z")

</div>

> I am actually quite surprised by the lack of response.
> 
> When using Ansible for implementing changes across systems, I can't help  
> to think you want to talk to network devices and alter rules? Also, when  
> doing operating system and hardware updates, you want to talk to the BMC,  
> for which the ssh port is the most reliable way!
> 
> I've gone through researching, and actually this seems to be a  
> question/feature request that pops up reasonably frequently at different  
> places.
> 
> When seen as a feature request, it would be to implement a mode in the raw  
> module, which makes raw to just log on, and issues a command and reads the  
> output, instead of requesting a shell. mode=shell or plain.

I'm open to this.

---

<div class="post-metadata">

**Author:** ![Frits\_Hoogland](https://avatars.discourse-cdn.com/v4/letter/f/9de0a6/32.png) [@Frits\_Hoogland](https://forum.ansible.com/u/Frits_Hoogland)\
**Post date:** [September 4, 2014, 10:52am UTC](https://forum.ansible.com/t/talk-to-lights-out-adapters/16083/11 "2014-09-04T10:52:08Z")

</div>

Is there anything I can do to make the the plain feature be introduced?  
Sadly I am not python savvy enough to create this.

Cheers,

Frits

---

<div class="post-metadata">

**Author:** ![Michael\_DeHaan1](https://avatars.discourse-cdn.com/v4/letter/m/5e9695/32.png) [@Michael\_DeHaan1](https://forum.ansible.com/u/Michael_DeHaan1)\
**Post date:** [September 4, 2014, 11:47am UTC](https://forum.ansible.com/t/talk-to-lights-out-adapters/16083/12 "2014-09-04T11:47:21Z")

</div>

Filing a ticket about it on github would be good regardless.

We’ll likely have to incorporate it into the action plugin source for raw, which I don’t think will be especially difficult, though I will say it may be some time before this happens due to other things in the queue.

If others would like to attempt this, I’m suggesting something like:

raw: /usr/bin/foo asdf bar shell=false

And the code would have to parse off the free-form argument “shell=” if present, before sending the command.
