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

Non-default port in .ssh/config #10

Closed
justinsb opened this issue Jul 30, 2023 · 3 comments · Fixed by #11
Closed

Non-default port in .ssh/config #10

justinsb opened this issue Jul 30, 2023 · 3 comments · Fixed by #11
Assignees

Comments

@justinsb
Copy link

justinsb commented Jul 30, 2023

I have an SSH server that is (only) in my ~/.ssh/config, like this:

Host myserver
  HostName 10.20.30.40
  Port 10022
  User myuser

So a non-default port, and a hostname that does not actually resolve via DNS or /etc/hosts.

devpod-provider-ssh provider is able to connect to the host IP, because ssh myserver understands ~/.ssh/config. However, I believe that devpod-provider-ssh passes -p 22 even when I haven't specified the port via the PORT config value. Flags override the values in ~/.ssh/config, so ssh tries to connect on the wrong port.

A fix could be to change it so that the default is not specified in provider.yaml, and we keep track of whether the port is explicitly specified or not, and we only pass -p 22 if PORT is explicitly specified.

I did find a workaround, which is to specify PORT explicitly with something like: devpod provider set-options -o PORT=10022

@89luca89
Copy link
Contributor

Hi @justinsb thanks for the issue! I'll take a look at this 👍

@89luca89
Copy link
Contributor

89luca89 commented Aug 2, 2023

This will be included in the next release 👍

@justinsb
Copy link
Author

justinsb commented Aug 5, 2023

Awesome, thank you @89luca89 !

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

Successfully merging a pull request may close this issue.

2 participants