17.01.2025, 11:00
I have two LM4 (firmware 20160714) where I have a simple script that executes a command on a remote server using ssh. This has always worked but now the script fails on one of the LM4.
This is the script:
When I run this script on the good LM, I can see in the logfile on the remote machine that the connection is established. When I run the script on the other LM nothing shows up in the logfile.
I can ping the remote server from this LM.
The log(result) returns nothing.
Is there a way I can debug this to find out what is going on?
This is the script:
Code:
function my_telegram_remote(message)
log(message)
key = '/lib/genohm-scada/storage/id_rsa'
user = 'root'
ip = 'X.X.X.X'
port = 22
cmd = '/home/emm/bin/telegram_simple.lua ' .."'" ..message .."'"
log(cmd)
run = string.format('ssh -y -i %s %s@%s/%d %q', key, user, ip, port, cmd)
log(run)
result = io.readproc(run)
log(result)
end
When I run this script on the good LM, I can see in the logfile on the remote machine that the connection is established. When I run the script on the other LM nothing shows up in the logfile.
I can ping the remote server from this LM.
The log(result) returns nothing.
Is there a way I can debug this to find out what is going on?