Telnet connection
Riss Nicolas
alien275 at libertysurf.fr
Wed Feb 27 13:14:22 EST 2002
No, the port is correct. The telnet server is cingured to listen of the port
32.
Another suggestions ?
Thanks
"Mike Johnson" <afp_randjohnson at yahoo.com> a écrit dans le message de news:
8z9f2rks.fsf at fido.trinitycapital.com...
> "Riss Nicolas" <alien275 at libertysurf.fr> writes:
>
> > I jave used it but when y tried to connect it makes an error:
> > File "c:\test.py", line 9, in ?
> > tn = telnetlib.Telnet("192.168.0.9",32)
> > File "C:\PROGRA~1\python22\lib\telnetlib.py", line 190, in __init__
> > self.open(host, port)
> > File "C:\PROGRA~1\python22\lib\telnetlib.py", line 219, in open
> > raise socket.error, msg
> > socket.error: (10061, 'Connection refused')
> >
> > Programm:
> >
> > import getpass
> > import sys
> > import telnetlib
> > password = getpass.getpass()
> > tn = telnetlib.Telnet("192.168.0.9",32)
> > tn.read_until("Administrator Password : ")
> > tn.write(password + "\n")
> > tn.write("session\n")
> >
> >
> > Where is the mistake ?
>
> Wrong port. Try:
>
> tn = telnetlib.Telnet("192.168.0.9", 23)
>
>
> - Mike Johnson
>
More information about the Python-list
mailing list