0

Basically I have a server that has IPMI. I need to reset this when running a script and to do this I would ssh into the IPMI, then I would type cd /map1 then reset, and the adaptor will reset itself.

How on earth do I automate this via a script? I'm as far as ssh to the correct directory but any attempt to execute reset seems to reset the ssh connection and not the actual command on the adaptor/server.

I should add that using expect is not an option as it isn't installed and there's no way of installing it.

1 Answer 1

0

Either use expect or try this ugly hackery

( sleep 2; echo 'cd /map1'; sleep 2; echo 'reset'; sleep 2 ) | ssh ipmiService
2
  • This worked perfectly, thank you! Commented Sep 11, 2022 at 10:55
  • @RossGray lovely. Please remember to ✔ accept the answer if it was the (best) one that worked for you Commented Sep 11, 2022 at 11:28

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.