08-10-2012
You do not need to use expect to login noninteractively.
Google passwordless ssh, you'll find tutorials all over the internet to set up noninteractive login using keys. When you use ssh as designed instead of bruteforcing plaintext passwords into interactive logins with a third-party hacking tool, these problems don't occur.
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hello to all...this is my first post (so please go easy). :)
I feel pretty solid at expect scripting, but I'm running into an issue that I'm not able to wrap my head around. I wrote a script that is a little advanced for logging into a remote Linux machine and changing text in a file using sed.... (2 Replies)
Discussion started by: v1k0d3n
2 Replies
2. Shell Programming and Scripting
Hi All,
Using Expect script when I run it manually it works. But when I put the entry in crontab, the job is still running after 15 hours. The script was created as root. I don't think it's a permission issue. Any idea?
This is what I have under root crontab...
00 18 * * 1-5... (4 Replies)
Discussion started by: samnyc
4 Replies
3. Shell Programming and Scripting
This Expect script provides expect with a list of IP addresses to Cisco IPS sensors and commands to configure Cisco IPS sensors. The user, password, IP addresses, prompt regex, etc. have been anonymized. In general this script will log into the sensors and send commands successfully but there are... (1 Reply)
Discussion started by: genewolfe
1 Replies
4. Shell Programming and Scripting
Hi,
I already searched through the forum and tried to find a answer for my problem but I didn't found a full working solution, thats way I start this new thread and hope, some can help out.
I wonder that I'm not able to find a working solution for the following scenario:
Working in bash I... (8 Replies)
Discussion started by: Boemm
8 Replies
5. Shell Programming and Scripting
Hello All,
I am trying to automate an installation process using expect and sh script. My problem is that during the installation process the expected value can change according to the situation.
For Example if this is a first time installation then at step 3 I'll get "Do you want to accept... (0 Replies)
Discussion started by: alokrm
0 Replies
6. Shell Programming and Scripting
Hi.
Here is beginning of my script
#!/usr/local/bin/expect --
set timeout 15
spawn /usr/local/account.sh -n modify
expect "Password:" {send "mypassword\r"}
But due to some terminal control sequences (or something else, dunno exactly) my password prompt is looking like this:
and expect... (3 Replies)
Discussion started by: urello
3 Replies
7. Programming
Hi,
Am very new to expect scripting..
Can You please suggest me how to call an expect script inside another expect script..
I tried with
spawn /usr/bin/ksh
send "expect main.exp\r"
expect $root_prompt
and
spawn /usr/bin/ksh
send "main.exp\r"
expect $root_prompt
Both... (1 Reply)
Discussion started by: Priya Amaresh
1 Replies
8. Shell Programming and Scripting
(qemu) migrate -d tcp:192.168.122.1:4444
(qemu) info migrate
capabilities: xbzrle: off
Migration status: completed
total time: 4425 milliseconds
downtime: 3 milliseconds
transferred ram: 130338 kbytes
remaining ram: 0 kbytes
total ram: 1057152 kbytes
duplicate: 232613 pages
normal:... (0 Replies)
Discussion started by: yanglei_fage
0 Replies
9. Programming
I'm fairly new to scripting so this might not be possible.
I am using Expect with Cisco switches and need to capture the string after finding the expect request. For example, when I issue "show version" on a Nexus switch, I'm looking to capture the current firmware version:
#show version
... (0 Replies)
Discussion started by: IBGaryA
0 Replies
10. Shell Programming and Scripting
I have a bash script on server that runs fine when run interactively and writes stderr output to a file.
However, when invoked through a 'expect' script run on Mac OS my laptop which does ssh to the server : generates the expected file, but file has no content. I suspect the stderr is getting... (1 Reply)
Discussion started by: sdudc
1 Replies