Find the answer to your Linux question:
Results 1 to 2 of 2
I've got a script here that's supposed to log me into my proxy server... here's the script: #!/usr/bin/expect -f spawn ssh -D 1088 -p 80 myname@myipaddress.com expect "*password:*" send -- ...
  1. #1
    Just Joined!
    Join Date
    Apr 2008
    Posts
    14

    What's wrong with this script?

    I've got a script here that's supposed to log me into my proxy server... here's the script:

    #!/usr/bin/expect -f

    spawn ssh -D 1088 -p 80 myname@myipaddress.com
    expect "*password:*"
    send -- "mypassword\r"

    ----------------------------
    When I run that script, the output I get is like this:

    spawn ssh -D 1088 -p 80 myname@myipaddress.com
    myname@myipaddress.com's password: myterminalprompt:~$

    So what am I doing wrong?
    I've tried many different combinations and styles of the expect and send commands and nothing works.

  2. #2
    Linux Newbie Tutku's Avatar
    Join Date
    Jul 2007
    Location
    Izmir / Turkey
    Posts
    167
    instead of
    Code:
    expect "*password:*"
    use
    Code:
    expect "password:"
    for more information, please visit here.

Posting Permissions

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