Page 1 of 1
Nagiox XI - SSH Actions
Posted: Tue Feb 27, 2018 12:00 pm
by Boune
Hi,
Im trying to set up the SSH action wih the following nagios documentation :
https://support.nagios.com/kb/article.php?id=530
but it doesnt work for me...
nothing happen when i click "SSH access" u can check my capture:
when i run the putty_util.bat , it launch putty so the script is ok.
i try to make it works on Google Chrome on windows 10
thanks
Re: Nagiox XI - SSH Actions
Posted: Tue Feb 27, 2018 4:46 pm
by scottwilkerson
Lets verify that both these were added
Code: Select all
reg add HKEY_CLASSES_ROOT\ssh /f /ve /d "URL:ssh Protocol"
reg add HKEY_CLASSES_ROOT\ssh /f /v "URL Protocol" /d ""
Then also, I believe you need to restart the computer for the changes to take affect.
Re: Nagiox XI - SSH Actions
Posted: Wed Feb 28, 2018 3:36 am
by Boune
Hello,
Yep , i restarted my computer after reg modification.
here my regedit
Re: Nagiox XI - SSH Actions
Posted: Thu Mar 01, 2018 1:51 pm
by cdienger
I believe this is caused by the browser adding a "/" at the end - at least that is what I am seeing on my system. Currently workingn through this on my end, but I'd like you to modify the batch script slightly to verify if this is the same problem you're seeing. Try:
Code: Select all
@echo on
set var=%1
echo %var%
set extract=%var:~6,-1%
start "" "C:\Program Files (x86)\PuTTY\putty.exe" %extract%
ping 127.0.0.1 -n 6 > nul
This will keep the command line Window open long enough to gather some details.
Re: Nagiox XI - SSH Actions
Posted: Thu Mar 01, 2018 1:57 pm
by cdienger
Changing the extract line to:
set extract=%var:~6,-2%
Did the trick for me. There must be a hidden carriage return or something that the -1 strips off and we have to remove one more to remove the /.
Re: Nagiox XI - SSH Actions
Posted: Mon Mar 05, 2018 2:58 am
by Boune
Hi ,
I think i have another problem , the cmd prompt wont start... so i cant debug this with ur code...
it's like google chrome can't launch the putty_util.bat
Re: Nagiox XI - SSH Actions
Posted: Tue Mar 06, 2018 12:19 pm
by cdienger
Wont start as in using Win+R to open a run window and typing cmd.exe doesn't bring it up or closes it right away? If so, it sounds like you may have restrictions on the machine. Are you running with an admin account?