The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Advanced & Expert Users
Google UNIX.COM


UNIX for Advanced & Expert Users Advanced UNIX and Linux questions go here. Expert-to-Expert.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
authorized_keys and passwordless login mcrouch_2003 Linux 6 05-09-2008 10:28 AM
sftp using authorized_keys in unix rinku Shell Programming and Scripting 1 03-24-2008 08:05 AM
Will Password change affect authorized_keys? oracleuser SUN Solaris 2 01-28-2008 01:26 PM
monitoring SSH authorized_keys prvnrk Shell Programming and Scripting 0 07-19-2007 08:10 AM
DNS monitoring, how to littleghost IP Networking 0 05-29-2004 08:52 AM

Reply
 
Submit Tools LinkBack Thread Tools Search this Thread Display Modes
  #1  
Old 07-20-2007
Registered User
 

Join Date: Jul 2007
Posts: 110
monitoring SSH authorized_keys

Hi,

We have around 200 SUN Servers in production environment and I have one box from where I manage all the servers. It’s setup such that I can SSH from my box onto all the 200 servers with without supplying password. It is working fine but sometimes we notice the keys getting changed and asking for password once in a while.

So, the requirement is to have a script that checks if I can login from my box to ALL 200 box without supplying password (i.e., ensuring no keys changed). The condition here we have is NOT to use RSH/RLOGIN for checking the keys or whatever it is for.

Any help highly appreciated

Thanks

Praveen RK
Reply With Quote
Forum Sponsor
  #2  
Old 07-23-2007
sysgate's Avatar
Unix based
 

Join Date: Nov 2006
Location: /root
Posts: 1,200
I guess this is not such an easy task, but you can use TCL/Expect to achieve this. A while ago I've posted a suggestion how-to do this with expect, certainly, you are free to modify this little example per your needs.
So the logic would be as follows :
Use the expect part, as if you were simulating ssh sessions.
If the login is successful, just add entry to a log file, like :
Code:
If $? eq 0; then echo "Login to server $x OK, `date`" 
    else mail -s "Login to server $x failed" your@mail.com
This should be done for all of the 200 servers.
Reply With Quote
Google The UNIX and Linux Forums
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes




All times are GMT -7. The time now is 10:12 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008. All Rights Reserved.Ad Management by RedTyger Visit The Complex Event Processing Blog

Content Relevant URLs by vBSEO 3.2.0