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

use port from config file; if no port specified from config or cli, t… #84

Merged
merged 1 commit into from
Aug 7, 2023

Conversation

michaelknowles
Copy link
Contributor

…hen default to 22

main.go Show resolved Hide resolved
main.go Outdated

if keyfile, ok := file.Get("ssh-tunnel", "keyfile"); ok {
config.SSHConnConfig.KeyFile = keyfile
}
return nil
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm guessing this was inadvertently included from another commit?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah yep was looking at also adding a key file option to support things like vagrant easier

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

updated d08e1b7

main.go Outdated
@@ -968,7 +968,7 @@ func LoadConfig() (*Config, error) {
}

if config.SSHConnConfig.Port == "" {
config.SSHConnConfig.Port = "ssh"
config.SSHConnConfig.Port = "22"
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This doesn't matter. Go looks up port service names and translates to the numerical value.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

updated d08e1b7

@jackc jackc merged commit fa3b1c6 into jackc:master Aug 7, 2023
@jackc
Copy link
Owner

jackc commented Aug 7, 2023

Thanks!

@michaelknowles michaelknowles deleted the sshPortFromConfig branch August 7, 2023 17:20
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 this pull request may close these issues.

2 participants