cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1084
Views
0
Helpful
2
Replies

not able to telnet DWDM node using python

oishtiah
Cisco Employee
Cisco Employee

here below the script, please advise 

 

import getpass
import telnetlib

HOST = "10.1.252.84"
tn = telnetlib.Telnet(HOST)
user = raw_input("Enter your remote account: ")
password = getpass.getpass()
tn = telnetlib.Telnet(HOST)

tn.read ("login: ")
tn.write(user + "\n")
if password:
tn.read_until("Password: ")
tn.write(password + "\n")


tn.write("exit\n")

 

1 Accepted Solution

Accepted Solutions

omz
VIP Alumni
VIP Alumni

hi 

the code looks ok .. are you getting any error messages or connection timeout?

I guess you have tested telnet via putty or shell .. just to confirm port and creds?

View solution in original post

2 Replies 2

omz
VIP Alumni
VIP Alumni

hi 

the code looks ok .. are you getting any error messages or connection timeout?

I guess you have tested telnet via putty or shell .. just to confirm port and creds?

oishtiah
Cisco Employee
Cisco Employee

Hi, Telnet working via Putty, even the IP is pingable through other python script, could you please advise more