ProxyCommand parameter in config not used, cannot use ssh proxy jump host
ivanpavlina opened this issue · comments
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 root@10.0.0.1 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?
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!