Closed dhffb closed 2 months ago
Related Issues and Documentation
(Emoji vote if this was helpful or unhelpful; more detailed feedback welcome in this discussion.)
Without a self contained reproducer, including keys and a server config, I don't think this is an actionable report. The forums may be a better place to help you troubleshoot your issues further.
Unlike many projects, the Go project does not use GitHub Issues for general discussion or asking questions. GitHub Issues are used for tracking bugs and proposals only.
For questions please refer to https://github.com/golang/go/wiki/Questions
Go version
go 1.23.0 darwin/arm64 and golang.org/x/crypto v0.26.0
Output of
go env
in your module/workspace:What did you do?
What did you see happen?
connect fail: ssh: handshake failed: ssh: unable to authenticate, attempted methods [none], no supported methods remain.
What did you expect to see?
GO can establish the connection successfully.
I can connect using Python.
Py Code
This is ssh print:
C:\Users\Administrator>ssh -v -oHostKeyAlgorithms=+ssh-rsa user@host -p 22 OpenSSH_for_Windows_8.1p1, LibreSSL 3.0.2 debug1: Connecting to 121.14.xx.xx [121.14.xx.xx] port 22. debug1: Connection established. debug1: identity file C:\Users\Administrator/.ssh/id_rsa type -1 debug1: identity file C:\Users\Administrator/.ssh/id_rsa-cert type -1 debug1: identity file C:\Users\Administrator/.ssh/id_dsa type -1 debug1: identity file C:\Users\Administrator/.ssh/id_dsa-cert type -1 debug1: identity file C:\Users\Administrator/.ssh/id_ecdsa type -1 debug1: identity file C:\Users\Administrator/.ssh/id_ecdsa-cert type -1 debug1: identity file C:\Users\Administrator/.ssh/id_ed25519 type -1 debug1: identity file C:\Users\Administrator/.ssh/id_ed25519-cert type -1 debug1: identity file C:\Users\Administrator/.ssh/id_xmss type -1 debug1: identity file C:\Users\Administrator/.ssh/id_xmss-cert type -1 debug1: Local version string SSH-2.0-OpenSSH_for_Windows_8.1 debug1: Remote protocol version 2.0, remote software version ssh2js0.4.10srv debug1: no match: ssh2js0.4.10srv debug1: Authenticating to 121.14.xx.xx:22as 'user' debug1: SSH2_MSG_KEXINIT sent debug1: SSH2_MSG_KEXINIT received debug1: kex: algorithm: curve25519-sha256 debug1: kex: host key algorithm: ssh-rsa debug1: kex: server->client cipher: aes128-ctr MAC: hmac-sha2-256 compression: none debug1: kex: client->server cipher: aes128-ctr MAC: hmac-sha2-256 compression: none debug1: expecting SSH2_MSG_KEX_ECDH_REPLY debug1: Server host key: ssh-rsa SHA256:WBqmW60qLKWsvmz0TBhXN7DlkaIno30a5ycDgOpfl2M debug1: Host '[121.14.xx.xx]:22' is known and matches the RSA host key. debug1: Found key in C:\Users\Administrator/.ssh/known_hosts:13 debug1: rekey out after 4294967296 blocks debug1: SSH2_MSG_NEWKEYS sent debug1: expecting SSH2_MSG_NEWKEYS debug1: SSH2_MSG_NEWKEYS received debug1: rekey in after 4294967296 blocks debug1: pubkey_prepare: ssh_get_authentication_socket: No such file or directory debug1: Will attempt key: C:\Users\Administrator/.ssh/id_rsa debug1: Will attempt key: C:\Users\Administrator/.ssh/id_dsa debug1: Will attempt key: C:\Users\Administrator/.ssh/id_ecdsa debug1: Will attempt key: C:\Users\Administrator/.ssh/id_ed25519 debug1: Will attempt key: C:\Users\Administrator/.ssh/id_xmss debug1: SSH2_MSG_SERVICE_ACCEPT received debug1: Authentications that can continue: debug1: Next authentication method: publickey debug1: Trying private key: C:\Users\Administrator/.ssh/id_rsa debug1: Trying private key: C:\Users\Administrator/.ssh/id_dsa debug1: Trying private key: C:\Users\Administrator/.ssh/id_ecdsa debug1: Trying private key: C:\Users\Administrator/.ssh/id_ed25519 debug1: Trying private key: C:\Users\Administrator/.ssh/id_xmss debug1: Next authentication method: keyboard-interactive debug1: Authentications that can continue: debug1: Next authentication method: password debug1: read_passphrase: can't open /dev/tty: No such file or directory xxxxxxxxx's password: