Basically you do the following - you tell the ssh session to forward a
LOCAL
port over the wire to a remote address (in this case one of your cisco
servers).
So as an example
If you had a server at 10.0.0.1 port 21 then you could write
ssh.forward.local(12345, “10.0.0.1”, 21)
Then use the telnet object to connect to port 12345 - this will
automatically be forwarded over the wire to 10.0.0.1 port 21 via the ssh
connection.
So for step 2 you would create an array of your router addresses and
then
something like this
addrs = [‘10.0.0.1’, ‘10.0.0.2’, ‘10.0.0.3’]
addrs.each { |addr|
ssh.forward.local(12345, addr, 21)
connect to port 12345 on your localhost with telnet and pull down
the
config
}
John
John
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.