I've written a stored procedure that I use as a scheduled job in MSSQL to reboot a list of servers, I also log all response messages as errors\warnings in case reboot doesn't go well. All was fine as long as we used to use OpenSUSE, now we've installed various new servers and are tending to use Ubuntu.
The command that is run from MSSQL is (after doing it manually the first time to cache the RSA key):
putty.exe -ssh user@server -pw [password] -m D:\SQL\APPS\reboot.txt
It works (as in the server actually reboots) but it always answers with a "Server unexpexclty closed network connection" and this is very annoying as I keep on logging it as an error and then sending out alert emails to me and other net admins.
Anyway I can avoid this response? Different way to reboot ubuntu from MSSQL maybe?
Obviously I realize I could write a big IF in my stored procedure and ignore messages that contain "Server unexpexclty closed network connection" but I kinda wanted to avoid this route.
Thanks for any suggestions, James