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

Missing config attribute on <alias>.toml file causing application to fail #156

Open
davrodpin opened this issue Aug 16, 2021 · 2 comments
Open
Labels
bug Something isn't working

Comments

@davrodpin
Copy link
Owner

Affected Version

Master @ b6c4dc0

Expected Behavior

Application to use the default value $HOME/.ssh/config

Current Behavior

Application crashes with the following error stack:

panic: read .: is a directory

goroutine 20 [running]:
github.com/kevinburke/ssh_config.(*sshLexer).peek(0xc0000d6370, 0x0)
	/go/pkg/mod/github.com/kevinburke/[email protected]/lexer.go:202 +0xf7
github.com/kevinburke/ssh_config.(*sshLexer).lexVoid(0xc0000d6370, 0x0)
	/go/pkg/mod/github.com/kevinburke/[email protected]/lexer.go:141 +0x45
github.com/kevinburke/ssh_config.(*sshLexer).run(0xc0000d6370)
	/go/pkg/mod/github.com/kevinburke/[email protected]/lexer.go:224 +0x4a
created by github.com/kevinburke/ssh_config.lexSSH
	/go/pkg/mod/github.com/kevinburke/[email protected]/lexer.go:239 +0xd7

Steps to Reproduce

  1. Create the following alias
mole add alias remote test --verbose --insecure --source 192.168.33.11:9090 --destination 127.0.0.1:8080 --server [email protected]:22122 --key test-env/ssh-server/keys/key --keep-alive-interval 2s
  1. Start mole with alias
$ ./bin/mole start alias test
@davrodpin
Copy link
Owner Author

#159 should fix this.

@davrodpin
Copy link
Owner Author

#159 made mole to work under the described scenario but with a different behavior. Now the missing config attribute causes mole to use an empty configuration.

I think this issue needs to be kept open since the expected behavior is to try to use $HOME/.ssh/ssh_config before falls back to an empty configuration.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant