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

ssh: handshake failed: knownhosts: key mismatch #10

Open
APoniatowski opened this issue Jan 17, 2020 · 3 comments
Open

ssh: handshake failed: knownhosts: key mismatch #10

APoniatowski opened this issue Jan 17, 2020 · 3 comments
Assignees
Labels
bug Something isn't working good first issue Good for newcomers help wanted Extra attention is needed

Comments

@APoniatowski
Copy link
Owner

ssh: handshake failed: knownhosts: key mismatch
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x5f1b61]

goroutine 8 [running]:
github.com/APoniatowski/GoSSH/sshlib.connectAndRun(0xc0000b58a0, 0xc00001cb10, 0xd, 0xc000016840, 0x1a, 0xc00001cb38, 0x8, 0x0, 0x0, 0xc000016900, ...)
        C:/dev/golang/GoSSH/sshlib/sshlib.go:78 +0x4b1
created by github.com/APoniatowski/GoSSH/sshlib.RunAllServers
        C:/dev/golang/GoSSH/sshlib/sshlib.go:271 +0x463

This will need a quick patch...

@APoniatowski APoniatowski added the bug Something isn't working label Jan 17, 2020
@APoniatowski APoniatowski added this to the v1.0.0 Release milestone Jan 17, 2020
@APoniatowski APoniatowski self-assigned this Jan 17, 2020
APoniatowski added a commit that referenced this issue Jan 17, 2020
…kely due to duplicate/erronous entries in known_hosts file
@APoniatowski
Copy link
Owner Author

possible root cause: there are multiple entries in the known_hosts file (in prod environment) which might be causing these issues. I cannot clear out the known_hosts file and add them again. So I will have to test it out in my test environment (will test master and Dev branches and decide if a revert is needed on the Dev branch)
I will possibly make some changes to the seq option, to add servers to the known_hosts file and add prints to run seq first, to add entries... or create a separate option entirely.

@APoniatowski
Copy link
Owner Author

ran in test environment. still fails with key mismatch. I cleared my known_hosts file, ssh'd manually to them (with hostname and FQDN) and there is still a key mismatch. I might have to scrap the known_hosts/FixedHostkeys path/method

@APoniatowski APoniatowski added the good first issue Good for newcomers label Jan 18, 2020
@APoniatowski APoniatowski removed this from the v1.0.0 Release milestone Jan 20, 2020
@APoniatowski
Copy link
Owner Author

removed from milestone, as this is a separate issue that is not a complete blocker

@APoniatowski APoniatowski added the help wanted Extra attention is needed label Jan 20, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

1 participant