Find the answer to your Linux question:
Results 1 to 5 of 5
Hey, I am trying to connect to a phone system using a script: #!/bin/bash ( echo open 10.20.0.10 sleep 1 echo user sleep 1 echo password sleep 1 echo exit ...
  1. #1
    Just Joined!
    Join Date
    Jun 2008
    Posts
    3

    Telnet Script

    Hey,

    I am trying to connect to a phone system using a script:

    #!/bin/bash

    ( echo open 10.20.0.10
    sleep 1
    echo user
    sleep 1
    echo password
    sleep 1
    echo exit ) | telnet

    The output of the telnet is:

    (c) 2001 Avaya 17:36 08/06/08



    Site Name

    INDeX Administration

    CPU-X1000 :


    Username>

    Its not inputting the user name etc.

    Anyone got any ideas?

    Many Thanks

  2. #2
    Just Joined! vikko's Avatar
    Join Date
    Mar 2008
    Location
    Argentina
    Posts
    11
    your script has worked for me, so...
    perhaps you should also try:

    #!/bin/bash

    ( echo "open 10.20.0.10 -l user"
    sleep 1
    echo password
    sleep 1
    echo exit ) | telnet


    bye



    you may also try setting higher sleeping times

  3. #3
    Just Joined!
    Join Date
    Jun 2008
    Posts
    3
    Silly question but did you try and connect to a index switch?

    Many Thanks

  4. #4
    Just Joined!
    Join Date
    Jun 2008
    Posts
    3
    Ok

    This is really wired. If I add a 'space' so for example:

    printf ' ' works
    printf 'test' dosn't work

    You can see this beeing entered to the switch, but as soon as you put any text it it dosn't do anything.

    Many Thanks

  5. #5
    Just Joined! vikko's Avatar
    Join Date
    Mar 2008
    Location
    Argentina
    Posts
    11
    yeah, i tried it, and it works for me


    and don't understand what you say about the spaces

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
...