An Interactive Menu for OOB

rwilson 0

Just like maintaining the machines themselves, connecting to hardware via out of band quickly became unmanageable. Access into the OOB tailnet is done by SSHing to a DERP relay. I figured the DERP relays already require a static IP and are members of the tailnet, so they make perfect jump boxes. I started by putting instructions in /etc/MOTD so you’d see instructions on how to connect to the gear you want to configure when you logged in. As the initial site quickly grew into 5, I modified MOTD to direct you to view individual txt files with instructions for each site. As I continued to add more and more sites it became cumbersome to navigate the files to find instructions to connect to what you want to.

I was talking this over with a friend who suggested I crate an interactive menu where you are ultimately automatically connected to the gear after making a couple selections. Early in my career I modified phone trees for a call center and this concept is very much the same. Unlike the phone tree scripts I had to start from scratch instead of modifying an existing script. ChatGPT ended up being surprising good at generating working templates which I was able to modify to do exactly what I wanted.

I started by creating a shell script template which is then tailored to each site by filling in variables and modifying the number of devices. Options 1 – 6 connect you to console sessions for those devices, option 99 restarts the ser2net service on the remote device in case it hangs, and option 0 drops you back to the main menu.

Next up was the main menu which dynamically builds a list of all available sites:

With that in place when you login to the DERP server via SSH it looks like this:


Leave a Reply

Your email address will not be published. Required fields are marked *