|No such thing as a small change|
Re^4: SSH to remote subsystem (Net::OpenSSH?)by sojourner9 (Initiate)
|on Mar 20, 2013 at 15:17 UTC||Need Help??|
Derp! Thanks! That extra line of "open2socket" was what was what was causing the problems. Don't know how I missed that creeping in there.
As for SSH/830 - It looks like the RFC says it must go into NETCONF subsystem when connected on port 830, but should be allowed access to NETCONF when connected to on other ports. Looks like Cisco's implementation is to have the user connect on port 22 and then call the susbsystem
So, once I got rid of that extra line, it seems to be connecting just fine. I see the banner and logon prompt, and then the remote device's hello message.
I had issues figuring out how to send queries and receive replies using open2socket, but got it to work using open_ex. Here's what I currently have:
And, here's a snippet of the results
My main problem right now is that I expected the "last" statement of the while loop to find the last line ("/nf:rpc-reply") of the switch's reply and move on to whatever we wanted to do next (In this case, close everything down). But, instead it seems to hang there, so I must still be missing something).
And, would open2socket be better than open_ex? And if so, can you show a sample of how to print to and read from it? I tried a couple different ways, but wasn't getting it