The tag has no wiki summary.

learn more… | top users | synonyms

0
votes
1answer
662 views

How to create auto vote script using `expect`?

I'd like to test auto-vote protection on my site (not published yet). I've found Expect program, but I can't get it working with telnet http.
2
votes
1answer
673 views

How to get the PID from a spawned process in expect?

Example: In a shell script I open a SSH tunnel whit this: /usr/bin/expect <<EOD set timeout -1 spawn ssh -fNL localhost:1873:localhost:873 HOST expect "*?assword:" { send "$SSHPASS\r"} sleep 2 ...
3
votes
2answers
751 views

encfs with expect access denied

If I execute script #!/usr/bin/expect set pass [lindex $argv 0] spawn encfs -v {CRIPT_DIR} {MNT_DIR} -o nonempty expect "*EncFS Password:*" send "$pass\r" expect eof expect script output: ...
1
vote
2answers
381 views

Automate creation of an at job using expect

I am trying to write a script that will take time and process-name and pass them to at to schedule the job. I cannot send the EOT. #! /usr/bin/expect # Usage: setupkill.exp time process. ...
2
votes
2answers
5k views

SSH + Sudo + Expect in Bash script: Run command with sudo in remote machine

I am trying to automate the deploy of some .deb packages with an script. I want to execute sudo dpkg -i $myDeb.deb in a list of remote machines I can access with ssh. I've tried to automate the ...
1
vote
2answers
768 views

How to meet required dependencies in order to install expect pecl extension on Mac OS X?

I am attempting to install the expect pecl extension. OS version = 10.7.3 PHP version 5.3.10 installed via macports expect version 5.45 installed via macports The command I am executing: ...
2
votes
2answers
411 views

Regular expressions with ExpectJ

I've been used the ExpectJ Java library to automate some jobs on a Linux server, however now I need to automate a job that sends a different text response for each execution. Here is the output: Last ...
1
vote
1answer
2k views

Run expect inside a bash script as another user

I am writing a bash script to install some small software I'm developing. That script is run with sudo (as root), but some of the commands that are executed by the script need (or should be) run with ...
7
votes
3answers
28k views

Shell Script for logging into a ssh server

I tried writing a shell script which can do automatic login into a ssh server using password which is mentioned in the script. I have written the following code: set timeout 30 /usr/bin/ssh -p 8484 ...
3
votes
4answers
2k views

passing passwords to a script

I want to scp a file to a remote host, and from there, run a command on the file, and exit the remote session. If I write a usual script, call scp and then ssh, I am prompted to enter two passwords. ...
3
votes
3answers
12k views

How to auto type password for SCP or SFTP to automate it?

I have script where I put scp command to backup file to other server. But when it runs it asking to type password. Is there way to automate this? I am using CentOS 5.6. I have seen few guides they use ...
2
votes
3answers
3k views

Pass the background flag (&) through expect and ssh

My command line/bash fu is extremely weak, but I'm trying to hone my abilities. Hopefully someone can help. I wrote a super simple expect script so that I can SSH in to a headless box we're using at ...