Unable to authenticate, attempted methods [none publickey] Error. (fixed)
I had an issue with this error trying to connect to an AWS ec2 instance: "Could not connect to ssh (failed to dial). Error is: ssh: handshake failed: ssh: unable to authenticate, attempted methods [none publickey], no supported methods remain" but was able to connect from the same machine with the same key using ssh command directly, so I discarded an issue with the key. Im my case I was able to fix it compiling & generating a new .exe filelocally after update these libraries to the newest ones:
go 1.17
require ( github.com/spf13/viper v1.15.0 golang.org/x/crypto v0.5.0 )
After that, worked like a charm. Thanks for your amazing job!
Edited by Moisés David González Rojas