launching ssh session via action_url (or other mechanism)

Andy Shellam andy-lists at networkmail.eu
Sun Dec 14 23:54:23 CET 2008


Hi Eric,
 
I'm not sure if PuTTY or other SSH clients support the ssh:// URL 
handler directly, but if not you can add it yourself.  See the MSDN 
documentation at the URL below.  You could add a protocol handler for 
the "ssh://" protocol, then if you put "ssh://192.168.0.1" as your URL 
in Nagios, the client PC will launch the application you put in the 
registry and pass it "192.168.0.1" as the "%1" argument.

http://msdn.microsoft.com/en-us/library/aa767914.aspx

E.g. your "shell open command" for PuTTY would be something like: 
"C:\|putty.exe" -ssh "%1"|

I've done a similar thing with an application I manage at work and it 
was really easy.  The only downside is the registry has to be updated on 
every PC, but you could export the registry key as a .reg file and pass 
it around to those who need it.

I believe it's a system-wide thing, so it should work in Firefox as 
well, but don't quote me on it.

Regards,
Andy

Eric Pearce wrote:
> I'd like to be able click on the link presented by action_url in the 
> Nagios display or $HOSTACTIONURL$ in a notfication email and have it 
> open a SSH session to the host in question.
> I found several people saying this is possible in the mailing list 
> archives, but I don't see any detailed examples or instructions.   I'm 
> not a java programmer.
> I don't think the IE-specific telnet:// registry hack is good enough - 
> I want to be able to use Firefox as well.
> I'm running nagios 3.0.6 and 1.4.13 plugins
> Thanks for any pointers.
> -e
>  
> ------------------------------------------------------------------------
>
> ------------------------------------------------------------------------------
> SF.Net email is Sponsored by MIX09, March 18-20, 2009 in Las Vegas, Nevada.
> The future of the web can't happen without you.  Join us at MIX09 to help
> pave the way to the Next Web now. Learn more and register at
> http://ad.doubleclick.net/clk;208669438;13503038;i?http://2009.visitmix.com/
> ------------------------------------------------------------------------
>
> _______________________________________________
> Nagios-users mailing list
> Nagios-users at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/nagios-users
> ::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. 
> ::: Messages without supporting info will risk being sent to /dev/null

------------------------------------------------------------------------------
SF.Net email is Sponsored by MIX09, March 18-20, 2009 in Las Vegas, Nevada.
The future of the web can't happen without you.  Join us at MIX09 to help
pave the way to the Next Web now. Learn more and register at
http://ad.doubleclick.net/clk;208669438;13503038;i?http://2009.visitmix.com/
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. 
::: Messages without supporting info will risk being sent to /dev/null





More information about the Users mailing list