![]() |
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| S-174: Vulnerability in OLE Automation | iBot | Security Advisories (RSS) | 0 | 02-12-2008 07:30 PM |
| Web automation using perl | gurukottur | Shell Programming and Scripting | 1 | 10-11-2007 12:22 AM |
| FTP automation Job scheduling | SATYAPRIYA_D | UNIX for Advanced & Expert Users | 1 | 04-27-2007 10:13 AM |
| X11 automation? | dlundh | OS X (Apple) | 1 | 04-18-2007 08:20 AM |
| Automation of telnet and ftp | asutoshch | UNIX for Dummies Questions & Answers | 10 | 11-09-2001 12:51 PM |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
Help in automation...
Hi All,
I need to run the same command on many servers. I am using ssh for the same. Following is the script that I am using to fire the same command on multiple machines. Code:
#!/bin/bash # Linux/UNIX box with ssh key based login #SERVERS="iqmevrick,iqmango" # SSH User name USR="root" # connect each host and pull up user listing for host in `cat list` do ssh $USR@$host date done Can someone please help... Code:
#!/usr/bin/expect -f # now connect to remote UNIX box (ipaddr) with given script to execute spawn ssh root@$ipaddr date match_max 100000 # Look for passwod prompt expect "*?assword:*" # Send password aka $password send -- "$password\r" # send blank line (\r) to make sure we get back to gui send -- "\r" expect eof |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|