Bottom Page

Thread Rating:
  • 3 Vote(s) - 4.33 Average
  • 1
  • 2
  • 3
  • 4
  • 5
 Telnet to switch from jump start server(linux)

I just want to ask if anyone here has script or idea what method, library etc should. My target is to SHH first from my workstation to Linux jumpstart server then from jumpstart server I'll access the network devices like switch and routers to execute some show commands.

PYTHON SCRIPT ----SSH---> Jumpstart server(ubuntu) ----Telnet---> Network Devices (Cisco)

import base64, time, sys
import paramiko, getpass, telnetlib

#ENTER Password
##pword = getpass.getpass('Password: ')

client = paramiko.SSHClient()
client.connect(hostname='xxxxx', username='xxxxx', password='xxxxx')
stdin, stdout, stderr = client.exec_command('pwd')

for line in stdout:
    print('Teton: ' + line.strip('\n'))
I'm now able to access the jumpstart server from my PC, the next thing is just to telnet from the jumpstart server?

Thank you

Top Page

Forum Jump:

Users browsing this thread: 1 Guest(s)