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

ProxyJump #14

Open
sebtechni opened this issue Jan 3, 2023 · 1 comment
Open

ProxyJump #14

sebtechni opened this issue Jan 3, 2023 · 1 comment

Comments

@sebtechni
Copy link

Hello,

It seems to not be working with SSH ProxyJump.

It would be great to be able to use it with ProxyJump.

Thanks.

@allanrbo
Copy link
Owner

allanrbo commented Jan 13, 2023

Unfortunately this is not trivial to implement. FilesRemote doesn't use the OpenSSH client, but rather uses a more portable ssh client called Libssh2 (https://www.libssh2.org/). Unfortunately Libssh2 doesn't natively parse the .ssh/config file, so I'm doing that in FilesRemote for just a few selected parameters. Parsing happens here:

// Parse the .ssh/config file.
So to support the ProxyJump parameter, parsing support would need to be added to that file, and then the more tricky thing would be to get Libssh2 to first make an ssh connection to your jump box, and then probably use the function libssh2_channel_direct_tcpip() to set up a tunnel to your next hop. There's an example of its usage here: https://www.libssh2.org/examples/direct_tcpip.html

As a workaround I suggest you use another ssh client to connect to your jumpbox, do port forwarding to your next hop, and connect FilesRemote to that port. Something like this:

ssh user1@jumpbox.example.com -L 10022:finaldestination.example.com:22
filesremote user1@localhost:10022

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