Network Management / (OpenView-NNM) Support and News Forum
Showing results for 
Search instead for 
Do you mean 

SSH from NNMi URL Actions

SOLVED
Go to Solution
Occasional Contributor

SSH from NNMi URL Actions

We have a need to allow our NOC operators to use SSH, not just telnet, to get to many of our devices. I have looked into the customized URL actions, but having a url capable of executing an action local to the client's browser (i.e. calling PuTTY/SSH against the selected node) is proving problematic, as most browsers and Windows settings are meticulous about blocking remote executions from web pages.

Anyone have any suggestions/examples for how they have added SSH options to NNMi's console?
1 ACCEPTED SOLUTIONS
Honored Contributor Honored Contributor

Re: SSH from NNMi URL Actions

Hello Scott,

here the procedure for ssh (example):

1. Create batch file C:\windows\system32\startPuttySshfromUrl.bat with:

@ECHO OFF
set parameter=%1%
set host=%parameter:ssh:=%
set host=%host://=%
set host=%host:/=%
cd "C:\WINDOWS\system32\"
start putty.exe -ssh %host%
REM pause

Place putty.exe in C:\Windows\system32.

2. Add registry entry (file puttySsh.reg):

Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\ssh]
@="URL:ssh Protocol"
"URL Protocol"=""

[HKEY_CLASSES_ROOT\ssh\shell]

[HKEY_CLASSES_ROOT\ssh\shell\open]

[HKEY_CLASSES_ROOT\ssh\shell\open\command]
@="\"C:\\WINDOWS\\system32\\startPuttySshfromUrl.bat\" \"%1\""

3. Define Action in NNMi with:

ssh://${hostname}

The registry key must installed on all workstations from which NNMi is accessed. The batch script can be placed on a network share where all NNMi users can call it (this makes it easier as only the reg file must be sent to the users).

HTH

Allessandro

PS: If ssh or telnet are already used you can define other "protocols" like prospero. But you must use one which NNMi url action can use.
2 REPLIES
Honored Contributor Honored Contributor

Re: SSH from NNMi URL Actions

Hello Scott,

here the procedure for ssh (example):

1. Create batch file C:\windows\system32\startPuttySshfromUrl.bat with:

@ECHO OFF
set parameter=%1%
set host=%parameter:ssh:=%
set host=%host://=%
set host=%host:/=%
cd "C:\WINDOWS\system32\"
start putty.exe -ssh %host%
REM pause

Place putty.exe in C:\Windows\system32.

2. Add registry entry (file puttySsh.reg):

Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\ssh]
@="URL:ssh Protocol"
"URL Protocol"=""

[HKEY_CLASSES_ROOT\ssh\shell]

[HKEY_CLASSES_ROOT\ssh\shell\open]

[HKEY_CLASSES_ROOT\ssh\shell\open\command]
@="\"C:\\WINDOWS\\system32\\startPuttySshfromUrl.bat\" \"%1\""

3. Define Action in NNMi with:

ssh://${hostname}

The registry key must installed on all workstations from which NNMi is accessed. The batch script can be placed on a network share where all NNMi users can call it (this makes it easier as only the reg file must be sent to the users).

HTH

Allessandro

PS: If ssh or telnet are already used you can define other "protocols" like prospero. But you must use one which NNMi url action can use.
Highlighted
Regular Advisor

Re: SSH from NNMi URL Actions

Thankfully putty is open source and someone was kind enough to create an ssh:// (launch via url) enabled version of putty.

http://schipka.com/archives/34

 

This allows you to skip the .bat .js .whatever intermediary script.

 

The issue I'm now having is that after upgrade to 9.1 they have added "browserless:" to the begining of the URL action (browserless:ssh://${hostname}" so that it doesn't leave an empty browser window in the background.Unfortunatly this seems to be breaking it for both telnet and ssh. If I remove "browserless:" it works again but then leaves the empty windows in the background. Anyone got a way to fix that?