How to establish an ssh connection in a Lua script to execute a command on a remote server? -
i want write script in lua establishing ssh connection execute command on remote server
can give me hint
thank you
you can use os.execute ('ssh user@127.0.0.1')
make connection, may have use os.execute ('ssh user@127.0.0.1 &'..yourcommand)
make execute afterwards in shell, i'm not entirely work. maybe better create script in bash , execute lua. if needed run differing commands, have script receive arguments.
Comments
Post a Comment