-
Notifications
You must be signed in to change notification settings - Fork 15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How use another port in ssh? #32
Comments
OK. I quoted the line calling ssh.exe from my Lua script. local SSHEXEPATH=os.getenv("windir") .. [[\system32\OpenSSH\ssh.exe]]
local remoteid = arg[1]
spawnctx(SSHEXEPATH,
"-o","ServerAliveInterval=60",
"-N",
"-v",
"-o","PubkeyAcceptedKeyTypes=+ssh-dss",
"-p","27311",
"-L","13333:"..remoteip..":3389",
"hymkor@example.com") Can it satisfy your needs ? |
How do you call expect directly from lua? |
To specify the port for ssh.exe , would you set the parameter as below to spawn() or spawnctx() ? "-p","27311", |
You don't quite understand me. |
There are no ways to import Expect.Lua on the pure lua interpreter. Expect.Lua is a standalone application using Gopher-Lua engine. |
Are you include expect.exe in lua?! But how?! |
The expect.exe contains the built-in Lua interpreter called as GopherLua that is the golang library. |
Yes, thanks a lot, I figured it out. I originally used io.popen in lua, but it only works with os.execute. |
Hello!
You did a great thing! Thanks.
I turn to your example.
But I can't use an alternative ssh port.
Perhaps you can give an example of how to do this. If you do not specify the port, everything works.
Thank you in advance!
The text was updated successfully, but these errors were encountered: