[Q] telnetlib
yoonseo at my-deja.com
yoonseo at my-deja.com
Mon Jan 22 10:58:05 EST 2001
Dear Doug
This is the log of my telnet manual telnet session.
I intentionally hided host name and user name.
Hope you can find what I am doing wrong.
sy
========================================================
LOCAL_PROMPT$ telnet REMOTE_HOST_NAME
Trying 129.116.218.132...
Connected to REMOTE_HOST_NAME
Escape character is '^]'.
Cray UNICOS (aurora) (ttyp028)
The University of Texas at Austin
Advanced Computing Center for Engineering and Science
*** UNAUTHORIZED ACCESS PROHIBITED ***
ACCES staff may monitor and record user activity to detect unauthorized
access. By using this system you are consenting to such observation.
----
Remote access via telnet, rlogin and ftp, for NPACI users or users coming in
from outside the University of Texas, is no longer supported on this system;
use secure shell and secure copy instead. Get more information on NPACI
security activities and ssh at http://www.npaci.edu/Security
----
login: USER_NAME
Password:
Active label set to : level0,none
Last successful login was : Mon Jan 22 09:46:36 from LOCAL_HOST_NAME
UNICOS 10.0.0.7 CRAY SV1-1A/16-16384 sn3002 (REMOTE_HOST_NAME)
--> SV1 information at http://www.hpc.utexas.edu.
--> SV1 manuals at http://dynaweb.hpc.utexas.edu:8080/
Please send problem reports to:
remark at hpc.utexas.edu (UT Austin Users mail here)
http://www.npaci.edu/Consult (NPACI Users use this web page)
-----------------------------------------------------------------------------
ACCT SYS Allocated Used AVAILABLE Period Updated Status ------- ---
--------- -------- --------- --------- --------- ------ A-byaa T3E
20000 3806.57 16193.43 1Q01-4Q01 Sun_23:55 active A-byaa SV1 62415
3325.91 59089.09 4Q00-4Q01 Sun_23:55 active
-----------------------------------------------------------------------------
TERM = (vt100) REMOTE_PROMPT% ls Bin Lib OUTPUT README dead.letter
libtime.a temp.txt REMOTE_PROMPT%
========================================================
In article <mailman.980041104.13905.python-list at python.org>,
Doug Stanfield <DOUGS at oceanic.com> wrote:
> Just a guess, but you may not be following exactly the sequence of strings
> are exchanged when you telnet to this device. Try to manually log in and
> copy the session to a followup.
>
> -Doug-
>
> > -----Original Message-----
> > From: yoonseo at my-deja.com [mailto:yoonseo at my-deja.com]
> > Sent: Friday, January 19, 2001 10:01 AM
> > To: python-list at python.org
> > Subject: [Q] telnetlib
> >
> >
> > Hi,
> >
> > I am trying to run commands on a remote computer using Python.
> > I think that using 'telnetlib' is the way to go, but I have trouble.
> > The following is the script that I wrote but it stops before
> > it reaches prompt, that is after 'TERM = (vt100) '.
> > Can somebody tell me what is wrong?
> >
> > Thanks in advance
> >
> > sy
> >
> >
> > --------------------------------------
> > import telnetlib
> >
> > HOST = 'host_name'
> > user = 'user_name'
> > pwd = 'my_password'
> >
> > tn = telnetlib.Telnet(HOST)
> >
> > print tn.read_until('login: ')
> > tn.write(user+'\n')
> >
> > print tn.read_until('Password:')
> > tn.write(pwd+'\n')
> >
> > print tn.read_until('TERM = (vt100) ')
> > tn.write('\n')
> >
> > print tn.read_until('% ')
> > tn.write('ls\n')
> >
> > print tn.read_until('% ')
> > tn.write('exit\n')
> >
> > print tn.read_all()
> > --------------------------------------
> >
> >
> > Sent via Deja.com
> > http://www.deja.com/
> > --
> > http://mail.python.org/mailman/listinfo/python-list
> >
>
>
Sent via Deja.com
http://www.deja.com/
More information about the Python-list
mailing list