Using Expect to make SSH connection in first script, and send commands in another
I have an Expect script which when called successfully connects to a device by ssh. If I want I can even send a command right after connecting. However, my goal is to send mulitple commands from a node.js script (not shown). So I have created a second Expect script to accept the commands and try to send them to the active spawn ID.