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

ProxyCommand parameter in config not used, cannot use ssh proxy jump host #164

Open
ivanpavlina opened this issue Sep 10, 2021 · 1 comment

Comments

@ivanpavlina
Copy link

Affected Version

1.0.1

Expected Behavior

SSH connection should be established though defined ssh proxy jump host

Current Behavior

Mole tries to connect directly to host without proxy and fails

Steps to Reproduce

~/.ssh/config entry:

Host test-server
   User             myuser
   Hostname         10.0.0.4
   ProxyCommand     ssh [email protected] nc %h %p
user@DESKTOP-XXXXXX:~$ mole start local --verbose --source :1234 --destination :1234 --server test-server --key ~/.ssh/id_rsa
DEBU[0000] using ssh config file from: /home/user/.ssh/config
DEBU[0000] server: [name=test-server, address=10.0.0.4:22, user=myuser]
DEBU[0000] tunnel: [channels:[[source=127.0.0.1:1234, destination=127.0.0.1:1234]], server:10.0.0.4:22]
DEBU[0000] known_hosts file used: /home/user/.ssh/known_hosts

ERRO[0003] error while connecting to ssh server          error="dial tcp 10.0.0.4:22: i/o timeout" retries=0 server="[name=test-server, address=10.0.0.4:22, user=myuser]"
ERRO[0009] error while connecting to ssh server          error="dial tcp 10.0.0.4:22: i/o timeout" retries=1 server="[name=test-server, address=10.0.0.4:22, user=myuser]"
ERRO[0015] error while connecting to ssh server          error="dial tcp 10.0.0.4:22: i/o timeout" retries=2 server="[name=test-server, address=10.0.0.4:22, user=myuser]"
ERRO[0018] maximum number of connection retries to the ssh server reached  retries=3 server="[name=test-server, address=10.0.0.4:22, user=myuser]"
ERRO[0018] error while connecting to ssh server          tunnel="[channels:[[source=127.0.0.1:1234, destination=127.0.0.1:1234]], server:10.0.0.4:22]"

Mole is trying to directly connect to 10.0.0.4 for which I don't have direct access, I have to use proxy jump host on 10.0.0.1
Is this something you would consider implementing?

@davrodpin
Copy link
Owner

Hi @ivanpavlina, that tis expected since mole does not understand ProxyCommand.

It is definitively a nice feature for mole and I can add it to the roadmap.

And thanks you for contributing for the project!

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