Is it possible to transfer an open spawn session to putty.
Some devices are not route-able and I need to telnet to border device then telnet from there to the device I want to connect too.
I would like the user to see only the final connection and interact with it.
I'm currently receiving the following error from putty
Unable to open connection to exp7
Name or service not known
example code
#!/bin/sh
package require Expect
spawn telnet 192.168.1.12
set id $spawn_id
expect "Username:"
exp_send "cisco\r"
expect "Password:"
exp_send "cisco\r"
expect "%"
spawn putty -telnet $id
expect "%"
interact
thanks
Some devices are not route-able and I need to telnet to border device then telnet from there to the device I want to connect too.
I would like the user to see only the final connection and interact with it.
I'm currently receiving the following error from putty
Unable to open connection to exp7
Name or service not known
example code
#!/bin/sh
package require Expect
spawn telnet 192.168.1.12
set id $spawn_id
expect "Username:"
exp_send "cisco\r"
expect "Password:"
exp_send "cisco\r"
expect "%"
spawn putty -telnet $id
expect "%"
interact
thanks