I’ve searched the forum and have found answers that say this is not possible at this time. I’d like to see the capability to have a script control a telnet session.
We have remote reboot devices (PDU) installed in our networks, but when gateway goes down I can’t power cycle any device. This means local staff has to find the equipment to power cycle it for us. With the above feature, the script could telnet to the PDU and cause it to reboot the gateway.
While you may be able to jury rig up the actual connection, you cannot control remote access to other devices via scripts. You cannot telnet out from scripts, you can’t SSH out, and you can’t use the serial console outbound.
However, you can install a phone line and a modem, and connect the modem to the serial port of your router and gain access that way, and then manually jump into the PDU. Having OOB (out of band) access to important sites is best practice if at all feasible.