#1
  1. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Sep 2003
    Location
    Bonnie scotland
    Posts
    2
    Rep Power
    0

    Telnet connection automatic


    Hi I'm a newbie to unix and i have been given a project to work on, this project involves running a script that opens a telnet session and checks for user id and password. But when the script is run the following error occurs

    Telnet> hostname <<!!
    > username
    > xyz
    > !!

    Trying 150.10.1.221...
    Connected to edcsun1.
    Escape character is '^]'.
    Connection closed by foreign host.

    The username and password are legitimate:
    and if wrong. It should prompt for user to enter correct details
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2003
    Location
    Jersey
    Posts
    64
    Rep Power
    11
    Have you tried telnetting to the machine manually without the script? If you don't get in manually, you'll never get in via script.

    If you have been able to do it manually, then there really should be no reason it doesn't work through scripting.

    -Gary
    Trying to change its program
    Trying to change the mode...crack the code
    Images conflicting into data overload
  4. #3
  5. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Sep 2003
    Location
    Bonnie scotland
    Posts
    2
    Rep Power
    0

    telnet ftp connection


    yeah works manually but wont allow the script, have tried using ftp with the .netrc file but still relatively new to this game (i.e. 2 weeks) so finding my feet anyway since then

    Trying to ftp a printer to collect info but the ftp file shows that when it gets to password the mode is incorrect

    both the login and the password are not compulsory (e.g. if the user hits the enter button twice the ftp session is initiated)

    any ideas

    Taking out the password line in the .netrc allows me to get to the password but this has to be entered manually i.e hit the enter button, to continue but I need this to be automatic
  6. #4
  7. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2003
    Location
    Jersey
    Posts
    64
    Rep Power
    11
    If the user/password are not necessary, and a blank carriage return suffices for both fields, can you send it an EOF for both lines?

    -Gary
    Trying to change its program
    Trying to change the mode...crack the code
    Images conflicting into data overload

IMN logo majestic logo threadwatch logo seochat tools logo