I am getting the message Server rejected connection.
$ ssh -Tv git@bitbucket.org
OpenSSH_7.7p1, OpenSSL 1.0.2p 14 Aug 2018
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: Connecting to bitbucket.org [18.205.93.1] port 22.
debug1: Connection established.
debug1: key_load_public: No such file or directory
debug1: identity file /c/Users/dkerrisk/.ssh/id_rsa type -1
debug1: key_load_public: No such file or directory
debug1: identity file /c/Users/dkerrisk/.ssh/id_rsa-cert type -1
debug1: key_load_public: No such file or directory
debug1: identity file /c/Users/dkerrisk/.ssh/id_dsa type -1
debug1: key_load_public: No such file or directory
debug1: identity file /c/Users/dkerrisk/.ssh/id_dsa-cert type -1
debug1: key_load_public: No such file or directory
debug1: identity file /c/Users/dkerrisk/.ssh/id_ecdsa type -1
debug1: key_load_public: No such file or directory
debug1: identity file /c/Users/dkerrisk/.ssh/id_ecdsa-cert type -1
debug1: key_load_public: No such file or directory
debug1: identity file /c/Users/dkerrisk/.ssh/id_ed25519 type -1
debug1: key_load_public: No such file or directory
debug1: identity file /c/Users/dkerrisk/.ssh/id_ed25519-cert type -1
debug1: key_load_public: No such file or directory
debug1: identity file /c/Users/dkerrisk/.ssh/id_xmss type -1
debug1: key_load_public: No such file or directory
debug1: identity file /c/Users/dkerrisk/.ssh/id_xmss-cert type -1
debug1: Local version string SSH-2.0-OpenSSH_7.7
debug1: Remote protocol version 2.0, remote software version conker_1.1.77-453a2b4 app-155
debug1: no match: conker_1.1.77-453a2b4 app-155
debug1: Authenticating to bitbucket.org:22 as 'git'
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug1: kex: algorithm: curve25519-sha256@libssh.org
debug1: kex: host key algorithm: ssh-rsa
debug1: kex: server->client cipher: chacha20-poly1305@openssh.com MAC: <implicit> compression: none
debug1: kex: client->server cipher: chacha20-poly1305@openssh.com MAC: <implicit> compression: none
debug1: expecting SSH2_MSG_KEX_ECDH_REPLY
debug1: Server host key: ssh-rsa SHA256:zzXQOXSRBEiUtuE8AikJYKwbHaxvSc0ojez9YXaGp1A
debug1: Host 'bitbucket.org' is known and matches the RSA host key.
debug1: Found key in /c/Users/dkerrisk/.ssh/known_hosts:1
debug1: rekey after 134217728 blocks
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug1: SSH2_MSG_NEWKEYS received
debug1: rekey after 134217728 blocks
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug1: Authentications that can continue: publickey
debug1: Next authentication method: publickey
debug1: Trying private key: /c/Users/dkerrisk/.ssh/id_rsa
debug1: Trying private key: /c/Users/dkerrisk/.ssh/id_dsa
debug1: Trying private key: /c/Users/dkerrisk/.ssh/id_ecdsa
debug1: Trying private key: /c/Users/dkerrisk/.ssh/id_ed25519
debug1: Trying private key: /c/Users/dkerrisk/.ssh/id_xmss
debug1: No more authentication methods to try.
git@bitbucket.org: Permission denied (publickey).
$ ssh-add -L
Could not open a connection to your authentication agent.
In sourcetree my ssh keys are defined in:
C:\Users\dkerrisk\Documents\Projects\sshkey.txt
This just started happening this morning, and has been working for months. How can I fix this, and what caused this to happen.
Dennis
Hello Dennis,
Thank you for reporting your steps taken along with the output from an attempted connection. From the response you sent I do see the following: Permission denied (publickey). This points to an issue with your SSH key being used to communicate with Bitbucket. You did mention that this has worked without issue until recently. With this said, I would proceed with creating a new SSH key to be used. The steps to complete this may be found at Set up an SSH key.
If you run into issues creating the key or are still having issues after creating a new key please reach back out and let us know.
Regards,
Stephen Sifers
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.