Server Management - Remote Server Management
1752505 Members
5528 Online
108788 Solutions
New Discussion

Re: cannot execute dos cmds via TEXTCONS of iLO3 using expect+ssh session

 
ParagM
New Member

cannot execute dos cmds via TEXTCONS of iLO3 using expect+ssh session

I am not able to send any dos commands via TEXTCONS on iLO3 via expect session.

I am able to grab the TEXTCONS, but after this I am not able to execute any dos commands.
I tried all combinations or "\r\n".

I am trying to do below from my expect script:
1) ssh to iLO3 using credentials
2) grab TEXTCONS
NOTE: The system is already booted using DOS USB key
3) I could see c:\> but I am not able to execute any dos commands there after.

Any solutions ?
1 REPLY 1
Unlisted
Advisor

Re: cannot execute dos cmds via TEXTCONS of iLO3 using expect+ssh session

Reply originally by Chris White

Albeit 6 years later - here's how i managed to resolve this issue (against a REDHAT 6 machine). The key being you need to emulate a human typing (i.e slower keystrokes than the default):

set timeout 20

spawn ssh user@remoteconsole.server.com

sleep 1
expect "user"
send "password\r"

sleep 1
expect "hpiLO"
send "TEXTCONS\r"

sleep 5
# Emulate human typing
set send_human {.1 .3 1 .05 2}
send -h "command here\r\n"

exit 0