LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Important ... linux command (https://www.linuxquestions.org/questions/linux-newbie-8/important-linux-command-869922/)

sattarkf 03-21-2011 02:05 AM

Important ... linux command
 
Can any one solve this problem..

There are several servers and i want shell script to check Linux OS version for all servers, I need automated script such that input should be server name and output should be linux os version.

Thank you

EricTRA 03-21-2011 02:13 AM

Hello,

You can write a Bash script to connect to all those servers (reading input from a file or from within the script using 'here' document), connect to them using SSH and save the output in a file for reviewing later. If you've set up SSH authentication with keys (host or user) you can use the script without the need for a password. If you don't you can use a program like sshpass to pass the password from within the script to the SSH command. This is one approach you can use, the work is up to you.

Kind regards,

Eric


All times are GMT -5. The time now is 04:03 AM.