I have used SSH2 before and it has worked well. However, my current project requires connecting to network devices over SSH terminal line access. Back in the day this was called reverse telnet. In a similar manner, connection over SSH requires the port number associate with a console connection, such as ssh -p 2021 1.1.1.1 in a terminal. The connection is not made to the router that hosts the console cables but to the device connected to the console cable that corresponds to the port. To get the console connection to respond requires sending a couple of CRLFs. With SSH2, I can't do this until a channel is open, yet it is not terminal router to which I am authenticating so I can't send carriage return and line feeds. What am I missing?
I'll answer my own. To do this, one needs to use the auth_keyboard_interactive method from the Session struct, then open the channel, and call channel.shell(). This will send back the data from a network device in a console of a terminal line router.