Skip to content
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

ssh proxy command #50

Open
argapost opened this issue Oct 30, 2021 · 3 comments
Open

ssh proxy command #50

argapost opened this issue Oct 30, 2021 · 3 comments
Milestone

Comments

@argapost
Copy link

argapost commented Oct 30, 2021

Hello and thanks for this plugin!

Is it possible to pass a proxy command to DistantLaunch in order to connect first to a different server and then to the final destination?

similar to this: ssh -o ProxyCommand="ssh proxyserver -W %h:%p" username@finalserver

Thank you in advance!

@chipsenkbeil
Copy link
Owner

chipsenkbeil commented Oct 30, 2021

@argapost there is under the name ssh.proxy_command for :DistantLaunch or ssh = { proxy_command = "..." } for host settings. I haven't tested it, which is why it isn't documented.

You can try DistantLaunch finalserver ssh.user=username ssh.proxy_command="ssh proxyserver -W somehost:someport" and see what happens.

@chipsenkbeil chipsenkbeil added question Further information is requested and removed question Further information is requested labels Oct 30, 2021
@argapost
Copy link
Author

Thanks for the answer. I run the command you proposed and I get this error:

caused by: ssh handshake with finalserver:22: [Session(-43)] Failed getting banner

Any ideas?

@chipsenkbeil
Copy link
Owner

chipsenkbeil commented Oct 31, 2021

You're getting into the depths of libssh2. I've never used the proxy command and it's only available because wezterm-ssh exposes it from libssh2.

Stackoverflow seems to provide a good explanation: https://stackoverflow.com/questions/61257397/ssh2-connect-error-starting-up-ssh-connection-43-failed-getting-banner.

Check the logs on your intermediate host. See if there's any failure described. Same with the ssh client being run on the local machine.

@chipsenkbeil chipsenkbeil added this to the backlog milestone May 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants