This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm that you accept these cookies being set.

Executing command on remote server fails
#1
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:
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?
Reply


Messages In This Thread
Executing command on remote server fails - by baggins - 17.01.2025, 11:00

Forum Jump: