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 hosts behind jumphosts are not resolved #104

Open
tlaerm opened this issue Nov 5, 2020 · 2 comments
Open

ssh hosts behind jumphosts are not resolved #104

tlaerm opened this issue Nov 5, 2020 · 2 comments

Comments

@tlaerm
Copy link

tlaerm commented Nov 5, 2020

I want to xxh into a host that is configured to use 2 jumphosts. It is not resolvable from my local machine. ssh apparently uses the jumphosts to resolve the final host.
laptop --- (VPN) ---> maestro ---> remote-gateway ---> dmz-app02
~/.ssh/config

Host dmz-app02.customers-localdomain.intranet
    User root
    ProxyJump maestro,remote-gateway

Host remote-gateway
    User fphtl
    HostName gateway.customerdomain.de
    ProxyJump maestro

Host maestro
    User root
    HostName maestro.localdomain.intranet

Now
ssh dmz-app02.customers-localdomain.intranet
works fine
but
xxh dmz-app02.customers-localdomain.intranet

Probably the connection takes more time than expected.
Try to increase the timeout by adding "++pexpect-timeout 10" argument.
Answer from host is empty. Try again with +v or +vv or try ssh before xxh.

If I add the IP address manually to the ssh config, it works fine. But that is a lot of hosts which change quite frequently. Is this inherent to the way xxh uses ssh or ist there a way to configure this?

@anki-code anki-code added the ssh label Nov 5, 2020
@anki-code
Copy link
Member

anki-code commented Nov 5, 2020

Hi @rdd2 ! Thank you for reporting this!

First, we have a lack of this kind of feedback before and this is the case that hard to test. It would be very cool if we had a docker-composed testing stand for this in xxh-dev. In this case we will be in the same environment while we testing xxh.

Second, the final xxh command is ssh host -t "/path/to/shell/entrypoint.sh" in fact. The connection between local host and the remote host are on the ssh shoulders. The first you can try to test is this command is working i.e. ssh host -t "/bin/bash". If it works then xxh should work. You can try to build xxh local on the remote host and repeat the command i.e. ssh host -t "/home/user/.xxh_local/.xxh/shells/..../entrypoint.sh". Don't forget about verbose mode -v in ssh and +v/+vv in xxh.

Third, on the off-chance, try what you see in the notification - increase timeout - ++pexpect-timeout 90.

Finally try to disable pexpect by adding ++pexpect-disable.

Thanks for diving into it! Resolving this issue is very desirable and appreciated!

@tlaerm
Copy link
Author

tlaerm commented Nov 8, 2020

Thank you for your answer. I've got some pressing stuff to finish first but then I'll set up a test bench for this and get back to you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants