Here is the issue. I was using my script to connect to a device directly over a telnet connection (from my windows desktop <=(telnet)=> to the device). Basicly, my script run some commands in TL1, capture the output and proceed according the parameter values... pretty straight forward.
This device will be install on another network, which i can't reach anymore by telnet directly. Now, i have to start an ssh connection on the specific server and then, start the telnet session from there. (from my windows desktop <=(ssh)=> server <=(telnet)=> to the device)
I understand the basic of paramiko... i found that code on jessenoler website:
import paramiko
ssh.connect('127.0.0.1', username='jesse', password='lol')
stdin, stdout, stderr = ssh.exec_command("uptime")
type(stdin)
stdout.readlines()
# output:
# ['13:35 up 11 days, 3:13, 4 users, load averages: 0.14 0.18 0.16\n']
I can't figure out how i could initiate a telnet from the server... Should i use :
ssh.exec_command("telnet 10.10.10.10 10001")
I know the easiest way to solve my problem is to have install python on the server, but i can't. Someone faced that kind a problem before? Thanks for the input! :)