Skip to content

SSH config file path flag parameter#136

Merged
davrodpin merged 4 commits intodavrodpin:masterfrom
markovichecha:config-path
Oct 27, 2020
Merged

SSH config file path flag parameter#136
davrodpin merged 4 commits intodavrodpin:masterfrom
markovichecha:config-path

Conversation

@markovichecha
Copy link
Contributor

You can now pass SSH config file path as a --config flag parameter.

@davrodpin davrodpin linked an issue Oct 6, 2020 that may be closed by this pull request
@shanyuen
Copy link

Please i need parameter that can change the location of config file.
So mole can be easily distributed and have flexibility to switch on different profiles.
Let me know if there is new compiled Windows version of this.

@davrodpin
Copy link
Owner

@markovichecha, I am getting the following error when using start alias which contains a config flag configured:

panic: read .: is a directory

goroutine 7 [running]:
github.com/kevinburke/ssh_config.(*sshLexer).peek(0xc00007c410, 0x0)
	/home/davrodpin/go/pkg/mod/github.com/kevinburke/ssh_config@v0.0.0-20190630040420-2e50c441276c/lexer.go:202 +0x101
github.com/kevinburke/ssh_config.(*sshLexer).lexVoid(0xc00007c410, 0x0)
	/home/davrodpin/go/pkg/mod/github.com/kevinburke/ssh_config@v0.0.0-20190630040420-2e50c441276c/lexer.go:141 +0x40
github.com/kevinburke/ssh_config.(*sshLexer).run(0xc00007c410)
	/home/davrodpin/go/pkg/mod/github.com/kevinburke/ssh_config@v0.0.0-20190630040420-2e50c441276c/lexer.go:224 +0x4a
created by github.com/kevinburke/ssh_config.lexSSH
	/home/davrodpin/go/pkg/mod/github.com/kevinburke/ssh_config@v0.0.0-20190630040420-2e50c441276c/lexer.go:239 +0xd7

The root cause is in function alias.ParseTunnelFlags() that is not copying alias.Config to tunnelflags.Config.

@davrodpin davrodpin merged commit 94e512c into davrodpin:master Oct 27, 2020
@davrodpin
Copy link
Owner

Thank you very much for your contribution, @markovichecha !

@markovichecha
Copy link
Contributor Author

Thanks for your project and code review!

@markovichecha markovichecha deleted the config-path branch April 28, 2021 19:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Feature Request - Optionally specify SSH config file

3 participants