I have the following code that connects to my router just fine. The problem is that once connected, I try to pass the "sh ver" command that never gets passed to the router. Thanks for your help!
require 'net/telnet'
cisco = '1.1.1.1' #Enter the IP address here
user = 'admin' #Enter username here
pass = 'mypass' #Enter password here
tn = Net::Telnet::new('Host' => cisco, 'prompt' => /^\Username:/ )
tn.cmd('String'=>'admin', 'Match'=>/Password:/) { |c| puts c }
tn.cmd(pass) { |c| puts c }
------------------Does not work below this line---------------------
tn.cmd('String'=>'sh ver')