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

transport_ssh: Check t is not nil before closing #100

Merged
merged 1 commit into from
Oct 28, 2020

Conversation

luke-orden
Copy link
Contributor

When connecting to a device where the user doesn't exist we get the
following:

goroutine 1 [running]:
github.com/Juniper/go-netconf/netconf.(*TransportSSH).Close(0x0, 0xc000108000, 0xc00009b040)
	/home/luke/work/src/github.com/Juniper/go-netconf/netconf/transport_ssh.go:42 +0x26
github.com/Juniper/go-netconf/netconf.DialSSHTimeout(0x62a7cb, 0x12, 0xc00009b040, 0x2540be400, 0x6325c1, 0x2f, 0xc00009b040)
	/home/luke/work/src/github.com/Juniper/go-netconf/netconf/transport_ssh.go:139 +0x110
main.main()
	/tmp/main.go:19 +0xc3
exit status 2

This is due to the connection being close without being established.

I have updated so we now get the following:

ssh: handshake failed: ssh: unable to authenticate, attempted methods [none publickey], no supported methods remain

When connecting to a device where the user doesn't exist we get the
following:

```
goroutine 1 [running]:
github.com/Juniper/go-netconf/netconf.(*TransportSSH).Close(0x0, 0xc000108000, 0xc00009b040)
	/home/luke/work/src/github.com/Juniper/go-netconf/netconf/transport_ssh.go:42 +0x26
github.com/Juniper/go-netconf/netconf.DialSSHTimeout(0x62a7cb, 0x12, 0xc00009b040, 0x2540be400, 0x6325c1, 0x2f, 0xc00009b040)
	/home/luke/work/src/github.com/Juniper/go-netconf/netconf/transport_ssh.go:139 +0x110
main.main()
	/tmp/main.go:19 +0xc3
exit status 2
```

This is due to the connection being close without being established.

I have updated so we now get the following:

```
ssh: handshake failed: ssh: unable to authenticate, attempted methods [none publickey], no supported methods remain
```
@nemith nemith merged commit 6bda392 into Juniper:master Oct 28, 2020
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.

None yet

2 participants