This is a discussion on Script for checking uptime on multiple hosts within the Shell scripting forums, part of the Development/Scripting category; Hi I want to check uptime on multiple hosts without putting passwords and generating ssh keys.. I have written below ...
|
|||||||
| Register | FAQ | Members List | Calendar | Forgotten your password? | Mark Forums Read |
|
|||
|
Hi
I want to check uptime on multiple hosts without putting passwords and generating ssh keys.. I have written below script, But it asks for passwd.. can some on check #!/bin/bash #!/usr/bin/expect -f set password “123″ SERVERS=”abc688 rgmgw1 abc173 abc30 abc101″ for host in $SERVERS do echo $host ; ssh -o StrictHostKeyChecking=no $host uptime done { expect “Password:*” send — “$password\r” send — “\r” expect eof } Thanks! Regards Madhusudan |
| Sponsored Links | ||
|
|
![]() |
| Bookmarks |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) |
|
| Thread Tools | |
| Display Modes | |
|
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| multiple server status script | marinm | Linux software | 21 | 10-24-2008 02:16 AM |
| Bash script for checking mysql processlist | pinoyskull | Shell scripting | 1 | 08-12-2008 11:33 AM |
| script to rm files on multiple servers | steve_f60 | Shell scripting | 1 | 06-21-2008 11:29 PM |
| login into multiple servers thru script... | avcert1998 | Shell scripting | 2 | 03-17-2007 04:29 AM |
| Script to add users to multiple servers. | deepakhg | Shell scripting | 0 | 03-17-2007 04:02 AM |