Closed Aterfax closed 2 years ago
LGTM! thanks for this - I had an older script that kept a screen
alive to work around the tty bug but it never really worked well so I didn't include it in the repo. SSH keys are way cleaner than the sshpass scripts - I didn't realize the iLO actually supported keys until much later & haven't been bothered to mess with my scripts yet
Just as a general info to anyone coming and using it - you'll need to add a loop sending a command on a fixed interval (120 seconds? is probably fine) or the tunnel will time itself out.
I was mainly just using this during upstart when debugging which sensors were needing silencing.
Might need a slight amendment but I am too tired to play about with it atm.
I use two cron jobs w/ my scripts to handle this -- something like:
@restart /home/whatever/my-start-script.sh # trigger script at bootup
*/6 * * * * /usr/bin/screen -S my-screen-name -X stuff 'fan info'`echo -ne '\015'` # send fan info regularly to keep alive
imo easier to maintain than an upstart / systemctl conf, at least in my setup
Aye, cron is perfect for this! :laughing: Told you I was tired!
This is an alternative script which uses SSH keys and screen to preserve the first TTY for further input and to see further output.
This avoids the bug where only the first SSH session / TTY gets fan info stdout.