Fibre Channel (SAN)

Reply
New Contributor
Posts: 2
Registered: ‎03-14-2013

Automated Health Check script using ssh login

Hello All,

I am trying to implement a automated health check script on a 5300 san switch with FOS 6.3.1A

I have managed to configure public key DSA login to automate the login from from the host to the switch and the automated login works fine.

Now, once the login completes, I want the script to issue a couple of show commands like switchshow & switchstatusshow and redirect their output to text files on the host. I will then automate the mailing of this output to me so that we can perform a health check on the switch.

Since I am new to scripting, I need help on how to configure this part.

So Far my script ( which is absolutely basic) looks like this ( and obviously it does not work!)

ssh test@switchIP# this works and the prompt comes to the switch login and stops here

switchshow > switchshow_results # need help in integrating this part into the script execution

switchstatusshow > switchsstatusshow_results# need help in integrating this part into the script execution

Any help in this matter will be appreciated.

Thanks a ton in advance!

Valued Contributor
Posts: 931
Registered: ‎12-30-2009

Re: Automated Health Check script using ssh login

You can add command parameters to your ssh syntax to execute a command remotely.

Then you only need to capture the output.

Mind you I actually have never tried this myself.

Send Remote Commands Via SSH — Malcontent Comics Incorporated Presents:

Join the Community

Get quick and easy access to valuable resource designed to help you manage your Brocade Network.