Page 1 of 1
Simple SSH script doesn't work
Posted: Friday 14 February 2020 18:16
by BlueLizard
I'm trying to write a simple script that SSHs into a server and kills a task. Like most things in domoticz this doesn't work. All the other commands in the script work apart from:
"C:\Program Files\PuTTY\putty.exe" -ssh "username 1"@192.168.0.2 -pw p@ssw0rd -m "C:\Program Files (x86)\Domoticz\scripts\kill.txt"
Any advice at all? I'm so close to just scrapping domoticz and starting again with another system.

Re: Simple SSH script doesn't work
Posted: Friday 14 February 2020 18:41
by freijn
Not the answer you are looking for I am afraid, but better scrap the Windhoos and move to linux.....
Re: Simple SSH script doesn't work
Posted: Friday 14 February 2020 18:57
by FireWizard
Hi,
Welcome on this forum.
However, to start a request for support with
Like most things in domoticz this doesn't work.
will not give you the desired result.
What you try to achieve has nothing to do with Domoticz, except that you want to execute a program, that is located in the directory Domoticz.
If you copy your script to the Windows directory, do you then conclude that nothing in Windows works?
Did you exchange the keys between your 2 machines?
Domoticz is a open-source application, developed by volunteers, available for free, supported by a lot of contributors.
With positive support we bring Domoticz further, but people, who prefer to move to 'another system" are encouraged to do so.
Regards
Re: Simple SSH script doesn't work
Posted: Saturday 15 February 2020 14:32
by erem
Agree with Firewizard, bashing domoticz in a help request accomplishes nothing.
having said that, here is my €.02
- does ssh work between the machines from the command line. if not, the problem is ssh config, not domoticz.
- you cannot execute txt files on windows. better rename kill.txt to kill.bat or kill.cmd
- spaces in a username is usually not a good idea, but it may be just the example.
like this
"C:\Program Files\PuTTY\putty.exe" -ssh "username1"@192.168.0.2 -pw p@ssw0rd -m "C:\Program Files (x86)\Domoticz\scripts\kill.bat"