04-18-2020 12:45 PM
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")
Solved! Go to Solution.
04-18-2020 05:16 PM
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?
04-18-2020 05:16 PM
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?
04-19-2020 01:26 AM
Hi, Telnet working via Putty, even the IP is pingable through other python script, could you please advise more
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide