So I am wondering if it is possible to send a command via SSH and get a return from a windows cmd session through PUTTY to a RPI.
What I am doing now is that i run a check IP from one Rpi to another Rpi and it return the IP address.
This works great on Linux because i have sshpass and it works flawless.
sudo -u openhabian sshpass -p MyPASSWORD123 ssh firstname.lastname@example.org -p222 'sudo /bin/checkip'
Now that I am migrating my Rpi OpenHAB to Windows OpenHAB i am having a problem trying to get these remote SSH Commands working
Currently have tried:
var String results = executeCommandLine ("C:\\openHAB2\\conf\\scripts\\CheckIP.bat", 5000)
It start up putty and then closes it right away and does not return an address to my for CheckIP.bat
"C:\Program Files\PuTTY\putty.exe" -ssh email@example.com -pw "MYPASSWORD1234!" -m checkip
Does anyone have any experience with using CMD/Putty to return values from a session?
Thanks for any help!