home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #3 / NN_1993_3.iso / spool / comp / unix / question / 15891 < prev    next >
Encoding:
Text File  |  1993-01-24  |  1.6 KB  |  50 lines

  1. Newsgroups: comp.unix.questions
  2. Path: sparky!uunet!usc!howland.reston.ans.net!bogus.sura.net!jhunix.hcf.jhu.edu!darwin.sura.net!newsserver.jvnc.net!yale.edu!ira.uka.de!Germany.EU.net!urmel.informatik.rwth-aachen.de!solaris.rz.tu-clausthal.de!news!zzsb
  3. From: zzsb@kursix.rrzn.uni-hannover.de (Wolfgang Sander-Beuermann)
  4. Subject: Re: Script to get the weather report
  5. Message-ID: <1993Jan22.115330.4365@newsserver.rrzn.uni-hannover.de>
  6. Sender: news@newsserver.rrzn.uni-hannover.de (News Service)
  7. Organization: RRZN
  8. X-Newsreader: Tin 1.1 PL4
  9. References: <1993Jan18.152114.7333@gw.wmich.edu>
  10. Date: Fri, 22 Jan 1993 11:53:30 GMT
  11. Lines: 37
  12.  
  13. automatic - telnet - login:
  14. ---------------------------
  15.  
  16. [ ... deleted ... ]
  17. >> 
  18. >>    user=YourUsername
  19. >>    passw=YourPassword
  20. >>    (\
  21. >>    sleep 5;\
  22. >>    echo "$user";\
  23. >>    sleep 10;\
  24. >>    echo "$passw";\
  25. >>    sleep 10;\
  26. >>    echo "AnyCommand";\
  27. >>    sleep 5;\
  28. >>    echo "exit";\
  29. >>    sleep 5\
  30. >>    )\
  31. >>    | telnet AnyHost > tempfile 2> /dev/null
  32. >> 
  33.  
  34. >This is great! I've been looking for a way to automate telnet logins for awile.
  35. >After testing this is seems to work great except for a small problem ;-).
  36.  
  37. >Telnet->login->password all work fine, but the remote connection always closes
  38. >just after I get logged-in. 
  39.  
  40. >Any ideas?
  41.  
  42. Yes: try playing around with the times in the sleep command; may be, your
  43. systems better like <sleep 20> or, opposite <sleep 3> or something else...
  44.  
  45. If it still does not work, please mail me the output file (in the example
  46. called "tempfile"). I've tried the thing with several machines - no
  47. problem.
  48.  
  49. Wolfgang Sander-Beuermann             zzsb@kursix.rrzn.uni-hannover.de
  50.