1. Bitbucket Website
  2. Public Issue Tracker
  3. master

Issues

Issue #3077 resolved

problems with git over ssh

Andrew Borovin
created an issue

I can't clone my git repository over ssh: {{{ $git clone git@bitbucket.org:andrewborovin/test.git test Cloning into test... Warning: Permanently added the RSA host key for IP address '207.233.240.181' to the list of known hosts. Permission denied (publickey). fatal: The remote end hung up unexpectedly }}}

Comments (43)

  1. Charles McLaughlin

    Hi Andrew,

    We're aware of an issue with our ssh key store that causes it to briefly truncate when adding two keys at the same time. Typically it only happens once a week or so, but due to increased usage after our Git support announcement it happened a couple times today. We do have checks in place for this and recover in a matter of seconds. We're currently working on a long-term fix for this and hope to have it out soon.

    I do see your key appears to be fine. Would you please try that clone again and let me know if it still fails?

    Regards,

    Charles

  2. Andrew Borovin reporter

    Hi! Thanks for response! It still fails

    The output:

    $ ssh -v git@bitbucket.org
    OpenSSH_4.6p1, OpenSSL 0.9.8e 23 Feb 2007
    debug1: Connecting to bitbucket.org [207.223.240.182] port 22.
    debug1: Connection established.
    debug1: identity file /c/Users/Andrew Borovin/.ssh/identity type -1
    debug1: identity file /c/Users/Andrew Borovin/.ssh/id_rsa type 1
    debug1: identity file /c/Users/Andrew Borovin/.ssh/id_dsa type -1
    debug1: Remote protocol version 2.0, remote software version OpenSSH_5.3
    debug1: match: OpenSSH_5.3 pat OpenSSH*
    debug1: Enabling compatibility mode for protocol 2.0
    debug1: Local version string SSH-2.0-OpenSSH_4.6
    debug1: SSH2_MSG_KEXINIT sent
    debug1: SSH2_MSG_KEXINIT received
    debug1: kex: server->client aes128-cbc hmac-md5 none
    debug1: kex: client->server aes128-cbc hmac-md5 none
    debug1: SSH2_MSG_KEX_DH_GEX_REQUEST(1024<1024<8192) sent
    debug1: expecting SSH2_MSG_KEX_DH_GEX_GROUP
    debug1: SSH2_MSG_KEX_DH_GEX_INIT sent
    debug1: expecting SSH2_MSG_KEX_DH_GEX_REPLY
    debug1: Host 'bitbucket.org' is known and matches the RSA host key.
    debug1: Found key in /c/Users/Andrew Borovin/.ssh/known_hosts:3
    debug1: ssh_rsa_verify: signature correct
    debug1: SSH2_MSG_NEWKEYS sent
    debug1: expecting SSH2_MSG_NEWKEYS
    debug1: SSH2_MSG_NEWKEYS received
    debug1: SSH2_MSG_SERVICE_REQUEST sent
    debug1: SSH2_MSG_SERVICE_ACCEPT received
    debug1: Authentications that can continue: publickey
    debug1: Next authentication method: publickey
    debug1: Trying private key: /c/Users/Andrew Borovin/.ssh/identity
    debug1: Offering public key: /c/Users/Andrew Borovin/.ssh/id_rsa
    debug1: Authentications that can continue: publickey
    debug1: Trying private key: /c/Users/Andrew Borovin/.ssh/id_dsa
    debug1: No more authentication methods to try.
    Permission denied (publickey).
    

    P.S. Mercurial works fine over ssh on the same machine (windows 7)

    I'll try to test it on ubuntu today

  3. Andrew Borovin reporter

    I found the problem, it's my fault, sorry... I put my ssh keys in the wrong directory. Git support is so amazing feature that i have lost my mind +) I'll never use puttygen for generate ssh-keys, git-bash is more usefull for this task

  4. Victor Bjelkholm
    • changed status to open

    I've got the same problem.

    "Typically it only happens once a week or so, but due to increased usage after our Git support announcement it happened a couple times today." Is this the problem for me?

    Added SSH-keys to account and this is my ssh -v git@bitbucket.org output:

    www16:~$ ssh -v git@bitbucket.org
    OpenSSH_5.1p1, OpenSSL 0.9.8j 07 Jan 2009
    debug1: Reading configuration data /etc/ssh/ssh_config
    debug1: Connecting to bitbucket.org [207.223.240.182] port 22.
    debug1: Connection established.
    debug1: identity file /home/u/u3705897/.ssh/identity type -1
    debug1: identity file /home/u/u3705897/.ssh/id_rsa type 1
    debug1: identity file /home/u/u3705897/.ssh/id_dsa type -1
    debug1: Remote protocol version 2.0, remote software version OpenSSH_5.3
    debug1: match: OpenSSH_5.3 pat OpenSSH*
    debug1: Enabling compatibility mode for protocol 2.0
    debug1: Local version string SSH-2.0-OpenSSH_5.1
    debug1: SSH2_MSG_KEXINIT sent
    debug1: SSH2_MSG_KEXINIT received
    debug1: kex: server->client aes128-cbc hmac-md5 none
    debug1: kex: client->server aes128-cbc hmac-md5 none
    debug1: SSH2_MSG_KEX_DH_GEX_REQUEST(1024<1024<8192) sent
    debug1: expecting SSH2_MSG_KEX_DH_GEX_GROUP
    debug1: SSH2_MSG_KEX_DH_GEX_INIT sent
    debug1: expecting SSH2_MSG_KEX_DH_GEX_REPLY
    debug1: Host 'bitbucket.org' is known and matches the RSA host key.
    debug1: Found key in /home/u/u3705897/.ssh/known_hosts:1
    debug1: ssh_rsa_verify: signature correct
    debug1: SSH2_MSG_NEWKEYS sent
    debug1: expecting SSH2_MSG_NEWKEYS
    debug1: SSH2_MSG_NEWKEYS received
    debug1: SSH2_MSG_SERVICE_REQUEST sent
    debug1: SSH2_MSG_SERVICE_ACCEPT received
    debug1: Authentications that can continue: publickey
    debug1: Next authentication method: publickey
    debug1: Trying private key: /home/u/u3705897/.ssh/identity
    debug1: Offering public key: /home/u/u3705897/.ssh/id_rsa
    debug1: Authentications that can continue: publickey
    debug1: Trying private key: /home/u/u3705897/.ssh/id_dsa
    debug1: No more authentication methods to try.
    Permission denied (publickey).
    
  5. Charles McLaughlin

    Hi Victor,

    For the sake of troubleshooting please rerun that ssh test with -i and specify the private key that is associated with the public key you uploaded to Bitbucket. For instance, something like this assuming ~/.ssh/id_rsa.pub was the uploaded to Bitbucket:

    ssh -vvv git@bitbucket.org -i ~/.ssh/id_rsa

    Please send us the output.

    Regards,

    Charles

  6. Anonymous

    I just ran into the same problem. It was working a couple hours ago. Here's the output:

    OpenSSH_5.5p1, OpenSSL 0.9.8e-fips-rhel5 01 Jul 2008 debug2: ssh_connect: needpriv 0 debug1: Connecting to bitbucket.org [207.223.240.182] port 22. debug1: Connection established. debug3: Not a RSA1 key file /home4/home/.ssh/id_dsa.pub. debug1: identity file /home4/home/.ssh/id_dsa.pub type 2 debug1: identity file /home4/home/.ssh/id_dsa.pub-cert type -1 debug1: Remote protocol version 2.0, remote software version OpenSSH_5.3 debug1: match: OpenSSH_5.3 pat OpenSSH* debug1: Enabling compatibility mode for protocol 2.0 debug1: Local version string SSH-2.0-OpenSSH_5.5 debug2: fd 3 setting O_NONBLOCK debug1: SSH2_MSG_KEXINIT sent debug1: SSH2_MSG_KEXINIT received debug2: kex_parse_kexinit: diffie-hellman-group-exchange-sha256,diffie-hellman-group-exchange-sha1,diffie-hellman-group14-sha1,diffie-hellman-group1-sha1 debug2: kex_parse_kexinit: ssh-rsa-cert-v00@openssh.com,ssh-dss-cert-v00@openssh.com,ssh-rsa,ssh-dss debug2: kex_parse_kexinit: aes128-ctr,aes192-ctr,aes256-ctr,arcfour256,arcfour128,aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,aes192-cbc,aes256-cbc,arcfour,rijndael-cbc@lysator.liu.se debug2: kex_parse_kexinit: aes128-ctr,aes192-ctr,aes256-ctr,arcfour256,arcfour128,aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,aes192-cbc,aes256-cbc,arcfour,rijndael-cbc@lysator.liu.se debug2: kex_parse_kexinit: hmac-md5,hmac-sha1,umac-64@openssh.com,hmac-ripemd160,hmac-ripemd160@openssh.com,hmac-sha1-96,hmac-md5-96 debug2: kex_parse_kexinit: hmac-md5,hmac-sha1,umac-64@openssh.com,hmac-ripemd160,hmac-ripemd160@openssh.com,hmac-sha1-96,hmac-md5-96 debug2: kex_parse_kexinit: none,zlib@openssh.com,zlib debug2: kex_parse_kexinit: none,zlib@openssh.com,zlib debug2: kex_parse_kexinit: debug2: kex_parse_kexinit: debug2: kex_parse_kexinit: first_kex_follows 0 debug2: kex_parse_kexinit: reserved 0 debug2: kex_parse_kexinit: diffie-hellman-group-exchange-sha256,diffie-hellman-group-exchange-sha1,diffie-hellman-group14-sha1,diffie-hellman-group1-sha1 debug2: kex_parse_kexinit: ssh-rsa,ssh-dss debug2: kex_parse_kexinit: aes128-ctr,aes192-ctr,aes256-ctr,arcfour256,arcfour128,aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,aes192-cbc,aes256-cbc,arcfour,rijndael-cbc@lysator.liu.se debug2: kex_parse_kexinit: aes128-ctr,aes192-ctr,aes256-ctr,arcfour256,arcfour128,aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,aes192-cbc,aes256-cbc,arcfour,rijndael-cbc@lysator.liu.se debug2: kex_parse_kexinit: hmac-md5,hmac-sha1,umac-64@openssh.com,hmac-ripemd160,hmac-ripemd160@openssh.com,hmac-sha1-96,hmac-md5-96 debug2: kex_parse_kexinit: hmac-md5,hmac-sha1,umac-64@openssh.com,hmac-ripemd160,hmac-ripemd160@openssh.com,hmac-sha1-96,hmac-md5-96 debug2: kex_parse_kexinit: none,zlib@openssh.com debug2: kex_parse_kexinit: none,zlib@openssh.com debug2: kex_parse_kexinit: debug2: kex_parse_kexinit: debug2: kex_parse_kexinit: first_kex_follows 0 debug2: kex_parse_kexinit: reserved 0 debug2: mac_setup: found hmac-md5 debug1: kex: server->client aes128-ctr hmac-md5 none debug2: mac_setup: found hmac-md5 debug1: kex: client->server aes128-ctr hmac-md5 none debug1: SSH2_MSG_KEX_DH_GEX_REQUEST(1024<1024<8192) sent debug1: expecting SSH2_MSG_KEX_DH_GEX_GROUP debug2: dh_gen_key: priv key bits set: 138/256 debug2: bits set: 554/1024 debug1: SSH2_MSG_KEX_DH_GEX_INIT sent debug1: expecting SSH2_MSG_KEX_DH_GEX_REPLY debug3: check_host_in_hostfile: host bitbucket.org filename /home4/home/.ssh/known_hosts debug3: check_host_in_hostfile: host bitbucket.org filename /home4/home/.ssh/known_hosts debug3: check_host_in_hostfile: match line 1 debug3: check_host_in_hostfile: host 207.223.240.182 filename /home4/home/.ssh/known_hosts debug3: check_host_in_hostfile: host 207.223.240.182 filename /home4/home/.ssh/known_hosts debug3: check_host_in_hostfile: match line 2 debug1: Host 'bitbucket.org' is known and matches the RSA host key. debug1: Found key in /home4/home/.ssh/known_hosts:1 debug2: bits set: 516/1024 debug1: ssh_rsa_verify: signature correct debug2: kex_derive_keys debug2: set_newkeys: mode 1 debug1: SSH2_MSG_NEWKEYS sent debug1: expecting SSH2_MSG_NEWKEYS debug2: set_newkeys: mode 0 debug1: SSH2_MSG_NEWKEYS received debug1: Roaming not allowed by server debug1: SSH2_MSG_SERVICE_REQUEST sent debug2: service_accept: ssh-userauth debug1: SSH2_MSG_SERVICE_ACCEPT received debug2: key: /home4/home/.ssh/id_dsa.pub (0xc99c70) debug1: Authentications that can continue: publickey debug3: start over, passed a different list publickey debug3: preferred publickey,keyboard-interactive,password debug3: authmethod_lookup publickey debug3: remaining preferred: keyboard-interactive,password debug3: authmethod_is_enabled publickey debug1: Next authentication method: publickey debug1: Offering public key: /home4/home/.ssh/id_dsa.pub debug3: send_pubkey_test debug2: we sent a publickey packet, wait for reply debug1: Authentications that can continue: publickey debug2: we did not send a packet, disable method debug1: No more authentication methods to try. Permission denied (publickey).

  7. Charles McLaughlin

    I'm not sure which user provided the detailed output since it was anonymous. However it was, please tell me the options you used with ssh. Did you use -i and specify the private key that is associated with the public key you uploaded to Bitbucket?

  8. Chris H

    (Reply via chri...@gmail.com):

    Just double checked.

    Command used:

    1. ssh -vvv git@bitbucket.org -i /.ssh/id_dsa.pub

    Public key:

    1. cat /.ssh/id_dsa.pub ssh-dss AAAAB3NzaC1kc3MAAACBAMV6cLJRME2OmPgOD6MpRDvjCKaqsF6NL4Lu/t8rV5PnkV1ueJjzxs1vuhpabP4HI9mE5gspUwXck74ga+6NYXFaLl6cvpjuZD6Elw0OfOjB44+tbchTiVjrKBD5wtYKKori5PITj5xPs96OvsveXtY/OUXvV9FB6Jk48qTCajebAAAAFQCugzpBavD537I9E4h/bYQT2KK0dwAAAIAPWWDVgsBP808MNN5eCDmRfQUOc/XYoNrclzze0KdvNkd3hQe1tbFmhMqG7RcK/c2ycyUSaRQzqIBbCLNOcVFtHqZ760g447NAHDKVyz/ZIA0t2AENesPslnvTtecmq3Ty9cYj2lkYY2Xa5krRdS6vS83l2jAMtkM7Rqf1UcVKNwAAAIB5jR7ejEdGZcNohupowcdXtc89apAr/NkLasrFrwgr0Beil3j7NHrTyyyW7aew0yn5t5fIBTkCnYM7Km2aES1KIkUF4I2V391GeaXzrGy9uEiL2hkcMpkzQ1LV8wwKSArrnuraqtdAmhytR/Mhaiud27HSW6yGzLjSK5g2iK9NRg== megaloka@box653.bluehost.com

    Thanks, -chris

  9. Charles McLaughlin

    Hi everyone,

    I just released a overhaul of our ssh infrastructure. We've had some issue with our ssh key file truncating in the past due to file locking issues. While it didn't happen very often, and we monitored it closely and quickly recovered, that problem very well could have caused some problems for you.

    I hope that is the real fix. If not, please send us an email at support@bitbucket.org.

    Thanks,

    Charles

  10. Kim Alvin Lambiguit

    hello,

    i know this thread is old but i'm having problems with my ssh connection. please see below for the output of the ssh test command you guys gave

    $ ssh -i ~/.ssh/id_rsa -vvv git@bitbucket.org
    OpenSSH_4.6p1, OpenSSL 0.9.8e 23 Feb 2007
    debug1: Reading configuration data /c/Users/kimlambiguit/.ssh/config
    debug1: Applying options for bitbucket.org
    debug2: ssh_connect: needpriv 0
    debug1: Connecting to bitbucket.org [207.223.240.181] port 22.
    debug1: connect to address 207.223.240.181 port 22: Attempt to connect timed out
    debug1: Connecting to bitbucket.org [207.223.240.182] port 22.
    debug1: connect to address 207.223.240.182 port 22: Attempt to connect timed out
    ssh: connect to host bitbucket.org port 22: Bad file number
    
  11. KIRUBA SANKAR SWAMINATHAN

    Hi there,

    I am stuck in this same problem. Please help me.

    OpenSSH_5.9p1 Debian-5ubuntu1, OpenSSL 1.0.1 14 Mar 2012 debug1: Reading configuration data /etc/ssh/ssh_config debug1: /etc/ssh/ssh_config line 19: Applying options for debug1: Connecting to bitbucket.org [207.223.240.182] port 22. debug1: Connection established. debug1: identity file /home/kiruba/.ssh/id_rsa type 1 debug1: Checking blacklist file /usr/share/ssh/blacklist.RSA-2048 debug1: Checking blacklist file /etc/ssh/blacklist.RSA-2048 debug1: identity file /home/kiruba/.ssh/id_rsa-cert type -1 debug1: identity file /home/kiruba/.ssh/id_dsa type -1 debug1: identity file /home/kiruba/.ssh/id_dsa-cert type -1 debug1: identity file /home/kiruba/.ssh/id_ecdsa type -1 debug1: identity file /home/kiruba/.ssh/id_ecdsa-cert type -1 debug1: Remote protocol version 2.0, remote software version OpenSSH_5.3 debug1: match: OpenSSH_5.3 pat OpenSSH debug1: Enabling compatibility mode for protocol 2.0 debug1: Local version string SSH-2.0-OpenSSH_5.9p1 Debian-5ubuntu1 debug1: SSH2_MSG_KEXINIT sent debug1: SSH2_MSG_KEXINIT received debug1: kex: server->client aes128-ctr hmac-md5 none debug1: kex: client->server aes128-ctr hmac-md5 none debug1: SSH2_MSG_KEX_DH_GEX_REQUEST(1024<1024<8192) sent debug1: expecting SSH2_MSG_KEX_DH_GEX_GROUP debug1: SSH2_MSG_KEX_DH_GEX_INIT sent debug1: expecting SSH2_MSG_KEX_DH_GEX_REPLY debug1: Server host key: RSA 97:8c:1b:f2:6f:14:6b:5c:3b:ec:aa:46:46:74:7c:40 debug1: Host 'bitbucket.org' is known and matches the RSA host key. debug1: Found key in /home/kiruba/.ssh/known_hosts:1 debug1: ssh_rsa_verify: signature correct debug1: SSH2_MSG_NEWKEYS sent debug1: expecting SSH2_MSG_NEWKEYS debug1: SSH2_MSG_NEWKEYS received debug1: Roaming not allowed by server debug1: SSH2_MSG_SERVICE_REQUEST sent debug1: SSH2_MSG_SERVICE_ACCEPT received debug1: Authentications that can continue: publickey debug1: Next authentication method: publickey debug1: Offering RSA public key: /home/kiruba/.ssh/id_rsa debug1: Remote: Forced command: conq username:kswaminathan debug1: Remote: Port forwarding disabled. debug1: Remote: X11 forwarding disabled. debug1: Remote: Agent forwarding disabled. debug1: Remote: Pty allocation disabled. debug1: Server accepts key: pkalg ssh-rsa blen 279 debug1: Remote: Forced command: conq username:kswaminathan debug1: Remote: Port forwarding disabled. debug1: Remote: X11 forwarding disabled. debug1: Remote: Agent forwarding disabled. debug1: Remote: Pty allocation disabled. debug1: Authentication succeeded (publickey). Authenticated to bitbucket.org ([207.223.240.182]:22). debug1: channel 0: new [client-session] debug1: Requesting no-more-sessions@openssh.com debug1: Entering interactive session. debug1: Sending environment. debug1: Sending env LANG = en_US.UTF-8 PTY allocation request failed on channel 0 conq: logged in as kswaminathan.

    You can use git or hg to connect to Bitbucket. Shell access is disabled. debug1: client_input_channel_req: channel 0 rtype exit-status reply 0 debug1: client_input_channel_req: channel 0 rtype eow@openssh.com reply 0 debug1: channel 0: free: client-session, nchannels 1 Connection to bitbucket.org closed. Transferred: sent 3072, received 2920 bytes, in 0.1 seconds Bytes per second: sent 21489.7, received 20426.4 debug1: Exit status 0

  12. Persa Zula

    This is the output of ssh -vvv git@bitbucket.org -i ~/.ssh/id_rsa for me on my server where I am trying to use capistrano for a deployment. Capistrano checks the git repo and clones a copy of the files into the correct folders for me, but it is having trouble cloning the git repo to my server.. I used this file to generate my ssh keys on my server

    OpenSSH_5.3p1, OpenSSL 1.0.0-fips 29 Mar 2010
    debug1: Reading configuration data /etc/ssh/ssh_config
    debug1: Applying options for *
    debug2: ssh_connect: needpriv 0
    debug1: Connecting to bitbucket.org [207.223.240.181] port 22.
    debug1: Connection established.
    debug3: Not a RSA1 key file /home/rmcwebsite/.ssh/id_rsa.
    debug2: key_type_from_name: unknown key type '-----BEGIN'
    debug3: key_read: missing keytype
    debug2: key_type_from_name: unknown key type 'Proc-Type:'
    debug3: key_read: missing keytype
    debug2: key_type_from_name: unknown key type 'DEK-Info:'
    debug3: key_read: missing keytype
    debug3: key_read: missing whitespace
    debug3: key_read: missing whitespace
    debug3: key_read: missing whitespace
    debug3: key_read: missing whitespace
    debug3: key_read: missing whitespace
    debug3: key_read: missing whitespace
    debug3: key_read: missing whitespace
    debug3: key_read: missing whitespace
    debug3: key_read: missing whitespace
    debug3: key_read: missing whitespace
    debug3: key_read: missing whitespace
    debug3: key_read: missing whitespace
    debug3: key_read: missing whitespace
    debug3: key_read: missing whitespace
    debug3: key_read: missing whitespace
    debug3: key_read: missing whitespace
    debug3: key_read: missing whitespace
    debug3: key_read: missing whitespace
    debug3: key_read: missing whitespace
    debug3: key_read: missing whitespace
    debug3: key_read: missing whitespace
    debug3: key_read: missing whitespace
    debug3: key_read: missing whitespace
    debug3: key_read: missing whitespace
    debug3: key_read: missing whitespace
    debug2: key_type_from_name: unknown key type '-----END'
    debug3: key_read: missing keytype
    debug1: identity file /home/rmcwebsite/.ssh/id_rsa type 1
    debug1: Remote protocol version 2.0, remote software version OpenSSH_5.3
    debug1: match: OpenSSH_5.3 pat OpenSSH*
    debug1: Enabling compatibility mode for protocol 2.0
    debug1: Local version string SSH-2.0-OpenSSH_5.3
    debug2: fd 3 setting O_NONBLOCK
    debug1: SSH2_MSG_KEXINIT sent
    debug3: Wrote 792 bytes for a total of 813
    debug1: SSH2_MSG_KEXINIT received
    debug2: kex_parse_kexinit: diffie-hellman-group-exchange-sha256,diffie-hellman-group-exchange-sha1,diffie-hellman-group14-sha1,diffie-hellman-group1-sha1
    debug2: kex_parse_kexinit: ssh-rsa,ssh-dss
    debug2: kex_parse_kexinit: aes128-ctr,aes192-ctr,aes256-ctr,arcfour256,arcfour128,aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,aes192-cbc,aes256-cbc,arcfour,rijndael-cbc@lysator.liu.se
    debug2: kex_parse_kexinit: aes128-ctr,aes192-ctr,aes256-ctr,arcfour256,arcfour128,aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,aes192-cbc,aes256-cbc,arcfour,rijndael-cbc@lysator.liu.se
    debug2: kex_parse_kexinit: hmac-md5,hmac-sha1,umac-64@openssh.com,hmac-ripemd160,hmac-ripemd160@openssh.com,hmac-sha1-96,hmac-md5-96
    debug2: kex_parse_kexinit: hmac-md5,hmac-sha1,umac-64@openssh.com,hmac-ripemd160,hmac-ripemd160@openssh.com,hmac-sha1-96,hmac-md5-96
    debug2: kex_parse_kexinit: none,zlib@openssh.com,zlib
    debug2: kex_parse_kexinit: none,zlib@openssh.com,zlib
    debug2: kex_parse_kexinit: 
    debug2: kex_parse_kexinit: 
    debug2: kex_parse_kexinit: first_kex_follows 0 
    debug2: kex_parse_kexinit: reserved 0 
    debug2: kex_parse_kexinit: diffie-hellman-group-exchange-sha256,diffie-hellman-group-exchange-sha1,diffie-hellman-group14-sha1,diffie-hellman-group1-sha1
    debug2: kex_parse_kexinit: ssh-rsa,ssh-dss
    debug2: kex_parse_kexinit: aes128-ctr,aes192-ctr,aes256-ctr,arcfour256,arcfour128,aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,aes192-cbc,aes256-cbc,arcfour,rijndael-cbc@lysator.liu.se
    debug2: kex_parse_kexinit: aes128-ctr,aes192-ctr,aes256-ctr,arcfour256,arcfour128,aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,aes192-cbc,aes256-cbc,arcfour,rijndael-cbc@lysator.liu.se
    debug2: kex_parse_kexinit: hmac-md5,hmac-sha1,umac-64@openssh.com,hmac-ripemd160,hmac-ripemd160@openssh.com,hmac-sha1-96,hmac-md5-96
    debug2: kex_parse_kexinit: hmac-md5,hmac-sha1,umac-64@openssh.com,hmac-ripemd160,hmac-ripemd160@openssh.com,hmac-sha1-96,hmac-md5-96
    debug2: kex_parse_kexinit: none,zlib@openssh.com
    debug2: kex_parse_kexinit: none,zlib@openssh.com
    debug2: kex_parse_kexinit: 
    debug2: kex_parse_kexinit: 
    debug2: kex_parse_kexinit: first_kex_follows 0 
    debug2: kex_parse_kexinit: reserved 0 
    debug2: mac_setup: found hmac-md5
    debug1: kex: server->client aes128-ctr hmac-md5 none
    debug2: mac_setup: found hmac-md5
    debug1: kex: client->server aes128-ctr hmac-md5 none
    debug1: SSH2_MSG_KEX_DH_GEX_REQUEST(1024<1024<8192) sent
    debug1: expecting SSH2_MSG_KEX_DH_GEX_GROUP
    debug3: Wrote 24 bytes for a total of 837
    debug2: dh_gen_key: priv key bits set: 121/256
    debug2: bits set: 501/1024
    debug1: SSH2_MSG_KEX_DH_GEX_INIT sent
    debug1: expecting SSH2_MSG_KEX_DH_GEX_REPLY
    debug3: Wrote 144 bytes for a total of 981
    debug3: check_host_in_hostfile: filename /home/rmcwebsite/.ssh/known_hosts
    debug3: check_host_in_hostfile: filename /etc/ssh/ssh_known_hosts
    debug3: check_host_in_hostfile: filename /home/rmcwebsite/.ssh/known_hosts
    debug3: check_host_in_hostfile: filename /etc/ssh/ssh_known_hosts
    debug3: check_host_in_hostfile: filename /home/rmcwebsite/.ssh/known_hosts
    debug3: check_host_in_hostfile: filename /etc/ssh/ssh_known_hosts
    debug2: no key of type 0 for host bitbucket.org
    debug3: check_host_in_hostfile: filename /home/rmcwebsite/.ssh/known_hosts2
    debug3: check_host_in_hostfile: filename /etc/ssh/ssh_known_hosts2
    debug3: check_host_in_hostfile: filename /home/rmcwebsite/.ssh/known_hosts
    debug3: check_host_in_hostfile: filename /etc/ssh/ssh_known_hosts
    debug2: no key of type 2 for host bitbucket.org
    The authenticity of host 'bitbucket.org (207.223.240.181)' can't be established.
    RSA key fingerprint is 97:8c:1b:f2:6f:14:6b:5c:3b:ec:aa:46:46:74:7c:40.
    Are you sure you want to continue connecting (yes/no)? 
    
  13. Ben Butler

    I have started experiencing ssh commands not working. I am using a public unsecured wifi connection at the moment and hoping that this is the problem. My output from the debug command is:

    $ ssh -vvv git@bitbucket.org -i ~/.ssh/id_rsa
    OpenSSH_4.6p1, OpenSSL 0.9.8e 23 Feb 2007
    debug1: Reading configuration data /c/Users/Ben/.ssh/config
    debug2: ssh_connect: needpriv 0
    debug1: Connecting to bitbucket.org [207.223.240.182] port 22.
    debug1: connect to address 207.223.240.182 port 22: Attempt to connect timed out
     without establishing a connection
    debug1: Connecting to bitbucket.org [207.223.240.181] port 22.
    debug1: connect to address 207.223.240.181 port 22: Attempt to connect timed out
     without establishing a connection
    ssh: connect to host bitbucket.org port 22: Bad file number
    

    I temporarily tried turning the firewall off to see if that was the problem but had the same result. I recently installed a virtual operating system and wonder if that screwed with my port configuration - this is my first git activity since then. Conflicting ports perhaps? Anyone have any ideas? I'll re-post when attempting from a secure network connection.

  14. Ben Butler

    For anyone interested. My particular issue seemed to be due to using a public unsecured connection (nothing ot do with conflicting ports). I was still able to use https git communications with bitbucket on this connection. Later, when using a secure connection my ssh commands worked as expected. Hope this may be of use to someone.

  15. Chima Okochi

    Hello Charles McLaughlin. I have the same permission problem and can't push to bitbucket anymore. the message I get is "Warning: Permanently added the RSA host key for IP address '104.192.143.1' to th e list of known hosts. Permission denied (publickey). fatal: Could not read from remote repository.

    Please make sure you have the correct access rights and the repository exists." I really dont know why this is happening now. Please help

  16. Lev Ananikyan

    I did pull without problem for a long time. Today I wrote $git pull as usual to get updates but saw following message: ssh: connect to host bitbucket.org port 22: Connection timed out fatal: Could not read from remote repository.

    Please make sure you have the correct access rights and the repository exists.

    I didn't change anything.

  17. Kjetil Granlien

    I got the same problem. It has been unstable for a long time, but now I can't pull at all.

    $ ssh -v git@bitbucket.org OpenSSH_4.6p1, OpenSSL 0.9.8e 23 Feb 2007 debug1: Reading configuration data /c/Users/npssadmin/.ssh/config debug1: Applying options for bitbucket.org debug1: Connecting to bitbucket.org [104.192.143.2] port 22. debug1: connect to address 104.192.143.2 port 22: Attempt to connect timed out without establishing a connection debug1: Connecting to bitbucket.org [104.192.143.3] port 22. debug1: connect to address 104.192.143.3 port 22: Attempt to connect timed out without establishing a connection debug1: Connecting to bitbucket.org [104.192.143.1] port 22. debug1: connect to address 104.192.143.1 port 22: Attempt to connect timed out without establishing a connection ssh: connect to host bitbucket.org port 22: Bad file number

    <EDIT> My problem was caused by firewall blocking port 22 to bitbucket server. Doh..

  18. Michael Vilabrera

    same here, can't pull

    $ ssh -vvv git@bitbucket.org -i ~/.ssh/id_rsa OpenSSH_6.9p1, LibreSSL 2.1.8 debug1: Reading configuration data /etc/ssh/ssh_config debug1: /etc/ssh/ssh_config line 20: Applying options for debug1: /etc/ssh/ssh_config line 102: Applying options for debug2: ssh_connect: needpriv 0 debug1: Connecting to bitbucket.org [104.192.143.2] port 22. debug1: Connection established. debug1: identity file /Users/mv/.ssh/id_rsa type 1 debug1: key_load_public: No such file or directory debug1: identity file /Users/mv/.ssh/id_rsa-cert type -1 debug1: Enabling compatibility mode for protocol 2.0 debug1: Local version string SSH-2.0-OpenSSH_6.9 debug1: Remote protocol version 2.0, remote software version OpenSSH_5.3 debug1: match: OpenSSH_5.3 pat OpenSSH_5* compat 0x0c000000 debug2: fd 5 setting O_NONBLOCK debug1: Authenticating to bitbucket.org:22 as 'git' debug3: hostkeys_foreach: reading file "/Users/mv/.ssh/known_hosts" debug3: record_hostkey: found key type RSA in file /Users/mv/.ssh/known_hosts:5 debug3: load_hostkeys: loaded 1 keys from bitbucket.org debug3: order_hostkeyalgs: prefer hostkeyalgs: ssh-rsa-cert-v01@openssh.com,ssh-rsa-cert-v00@openssh.com,ssh-rsa debug1: SSH2_MSG_KEXINIT sent debug1: SSH2_MSG_KEXINIT received debug2: kex_parse_kexinit: curve25519-sha256@libssh.org,ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group-exchange-sha256,diffie-hellman-group-exchange-sha1,diffie-hellman-group14-sha1,diffie-hellman-group1-sha1 debug2: kex_parse_kexinit: ssh-rsa-cert-v01@openssh.com,ssh-rsa-cert-v00@openssh.com,ssh-rsa,ecdsa-sha2-nistp256-cert-v01@openssh.com,ecdsa-sha2-nistp384-cert-v01@openssh.com,ecdsa-sha2-nistp521-cert-v01@openssh.com,ssh-ed25519-cert-v01@openssh.com,ssh-dss-cert-v01@openssh.com,ssh-dss-cert-v00@openssh.com,ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521,ssh-ed25519,ssh-dss debug2: kex_parse_kexinit: chacha20-poly1305@openssh.com,aes128-ctr,aes192-ctr,aes256-ctr,aes128-gcm@openssh.com,aes256-gcm@openssh.com,arcfour256,arcfour128,aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,aes192-cbc,aes256-cbc,arcfour,rijndael-cbc@lysator.liu.se debug2: kex_parse_kexinit: chacha20-poly1305@openssh.com,aes128-ctr,aes192-ctr,aes256-ctr,aes128-gcm@openssh.com,aes256-gcm@openssh.com,arcfour256,arcfour128,aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,aes192-cbc,aes256-cbc,arcfour,rijndael-cbc@lysator.liu.se debug2: kex_parse_kexinit: umac-64-etm@openssh.com,umac-128-etm@openssh.com,hmac-sha2-256-etm@openssh.com,hmac-sha2-512-etm@openssh.com,hmac-sha1-etm@openssh.com,umac-64@openssh.com,umac-128@openssh.com,hmac-sha2-256,hmac-sha2-512,hmac-sha1,hmac-md5-etm@openssh.com,hmac-ripemd160-etm@openssh.com,hmac-sha1-96-etm@openssh.com,hmac-md5-96-etm@openssh.com,hmac-md5,hmac-ripemd160,hmac-ripemd160@openssh.com,hmac-sha1-96,hmac-md5-96 debug2: kex_parse_kexinit: umac-64-etm@openssh.com,umac-128-etm@openssh.com,hmac-sha2-256-etm@openssh.com,hmac-sha2-512-etm@openssh.com,hmac-sha1-etm@openssh.com,umac-64@openssh.com,umac-128@openssh.com,hmac-sha2-256,hmac-sha2-512,hmac-sha1,hmac-md5-etm@openssh.com,hmac-ripemd160-etm@openssh.com,hmac-sha1-96-etm@openssh.com,hmac-md5-96-etm@openssh.com,hmac-md5,hmac-ripemd160,hmac-ripemd160@openssh.com,hmac-sha1-96,hmac-md5-96 debug2: kex_parse_kexinit: none,zlib@openssh.com,zlib debug2: kex_parse_kexinit: none,zlib@openssh.com,zlib debug2: kex_parse_kexinit: debug2: kex_parse_kexinit: debug2: kex_parse_kexinit: first_kex_follows 0 debug2: kex_parse_kexinit: reserved 0 debug2: kex_parse_kexinit: diffie-hellman-group-exchange-sha256,diffie-hellman-group-exchange-sha1,diffie-hellman-group14-sha1,diffie-hellman-group1-sha1 debug2: kex_parse_kexinit: ssh-rsa,ssh-dss debug2: kex_parse_kexinit: aes128-ctr,aes192-ctr,aes256-ctr,arcfour256,arcfour128,aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,aes192-cbc,aes256-cbc,arcfour,rijndael-cbc@lysator.liu.se debug2: kex_parse_kexinit: aes128-ctr,aes192-ctr,aes256-ctr,arcfour256,arcfour128,aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,aes192-cbc,aes256-cbc,arcfour,rijndael-cbc@lysator.liu.se debug2: kex_parse_kexinit: hmac-md5,hmac-sha1,umac-64@openssh.com,hmac-ripemd160,hmac-ripemd160@openssh.com,hmac-sha1-96,hmac-md5-96 debug2: kex_parse_kexinit: hmac-md5,hmac-sha1,umac-64@openssh.com,hmac-ripemd160,hmac-ripemd160@openssh.com,hmac-sha1-96,hmac-md5-96 debug2: kex_parse_kexinit: none,zlib@openssh.com debug2: kex_parse_kexinit: none,zlib@openssh.com debug2: kex_parse_kexinit: debug2: kex_parse_kexinit: debug2: kex_parse_kexinit: first_kex_follows 0 debug2: kex_parse_kexinit: reserved 0 debug1: kex: server->client aes128-ctr umac-64@openssh.com none debug1: kex: client->server aes128-ctr umac-64@openssh.com none debug1: SSH2_MSG_KEX_DH_GEX_REQUEST(1024<3072<8192) sent debug1: got SSH2_MSG_KEX_DH_GEX_GROUP debug2: bits set: 1519/3072 debug1: SSH2_MSG_KEX_DH_GEX_INIT sent debug1: got SSH2_MSG_KEX_DH_GEX_REPLY debug1: Server host key: ssh-rsa SHA256:zzXQOXSRBEiUtuE8AikJYKwbHaxvSc0ojez9YXaGp1A debug3: hostkeys_foreach: reading file "/Users/mv/.ssh/known_hosts" debug3: record_hostkey: found key type RSA in file /Users/mv/.ssh/known_hosts:5 debug3: load_hostkeys: loaded 1 keys from bitbucket.org debug3: hostkeys_foreach: reading file "/Users/mv/.ssh/known_hosts" debug3: record_hostkey: found key type RSA in file /Users/mv/.ssh/known_hosts:7 debug3: load_hostkeys: loaded 1 keys from 104.192.143.2 debug1: Host 'bitbucket.org' is known and matches the RSA host key. debug1: Found key in /Users/mv/.ssh/known_hosts:5 debug2: bits set: 1553/3072 debug2: set_newkeys: mode 1 debug1: SSH2_MSG_NEWKEYS sent debug1: expecting SSH2_MSG_NEWKEYS debug2: set_newkeys: mode 0 debug1: SSH2_MSG_NEWKEYS received debug1: Roaming not allowed by server debug1: SSH2_MSG_SERVICE_REQUEST sent debug2: service_accept: ssh-userauth debug1: SSH2_MSG_SERVICE_ACCEPT received debug2: key: /Users/mv/.ssh/id_rsa (0x7f8e2240f4a0), explicit debug1: Authentications that can continue: publickey debug3: start over, passed a different list publickey debug3: preferred publickey,keyboard-interactive,password debug3: authmethod_lookup publickey debug3: remaining preferred: keyboard-interactive,password debug3: authmethod_is_enabled publickey debug1: Next authentication method: publickey debug1: Offering RSA public key: /Users/mv/.ssh/id_rsa debug3: send_pubkey_test debug2: we sent a publickey packet, wait for reply debug1: Authentications that can continue: publickey debug2: we did not send a packet, disable method debug1: No more authentication methods to try. Permission denied (publickey).

    please advise

  19. Imrul Hasan

    what's the problem? $ git pull Warning: Permanently added the RSA host key for IP address '104.192.143.3' to the list of known hosts. Permission denied (publickey). fatal: Could not read from remote repository.

    Please make sure you have the correct access rights and the repository exists.

  20. Fahad PK

    ssh -v git@bitbucket.org out is....

    OpenSSH_7.1p1, OpenSSL 1.0.2d 9 Jul 2015 debug1: Reading configuration data /etc/ssh/ssh_config debug1: Connecting to bitbucket.org [104.192.143.2] port 22. debug1: Connection established. debug1: key_load_public: No such file or directory debug1: identity file /c/Users/rabit/.ssh/id_rsa type -1 debug1: key_load_public: No such file or directory debug1: identity file /c/Users/rabit/.ssh/id_rsa-cert type -1 debug1: key_load_public: No such file or directory debug1: identity file /c/Users/rabit/.ssh/id_dsa type -1 debug1: key_load_public: No such file or directory debug1: identity file /c/Users/rabit/.ssh/id_dsa-cert type -1 debug1: key_load_public: No such file or directory debug1: identity file /c/Users/rabit/.ssh/id_ecdsa type -1 debug1: key_load_public: No such file or directory debug1: identity file /c/Users/rabit/.ssh/id_ecdsa-cert type -1 debug1: key_load_public: No such file or directory debug1: identity file /c/Users/rabit/.ssh/id_ed25519 type -1 debug1: key_load_public: No such file or directory debug1: identity file /c/Users/rabit/.ssh/id_ed25519-cert type -1 debug1: Enabling compatibility mode for protocol 2.0 debug1: Local version string SSH-2.0-OpenSSH_7.1 debug1: Remote protocol version 2.0, remote software version OpenSSH_5.3 debug1: match: OpenSSH_5.3 pat OpenSSH_5* compat 0x0c000000 debug1: Authenticating to bitbucket.org:22 as 'git' debug1: SSH2_MSG_KEXINIT sent debug1: SSH2_MSG_KEXINIT received debug1: kex: server->client aes128-ctr umac-64@openssh.com none debug1: kex: client->server aes128-ctr umac-64@openssh.com none debug1: SSH2_MSG_KEX_DH_GEX_REQUEST(1024<3072<8192) sent debug1: got SSH2_MSG_KEX_DH_GEX_GROUP debug1: SSH2_MSG_KEX_DH_GEX_INIT sent debug1: got SSH2_MSG_KEX_DH_GEX_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/rabit/.ssh/known_hosts:1 Warning: Permanently added the RSA host key for IP address '104.192.143.2' to the list of known hosts. debug1: SSH2_MSG_NEWKEYS sent debug1: expecting SSH2_MSG_NEWKEYS debug1: SSH2_MSG_NEWKEYS received debug1: Roaming not allowed by server debug1: SSH2_MSG_SERVICE_REQUEST sent debug1: SSH2_MSG_SERVICE_ACCEPT received debug1: Authentications that can continue: publickey debug1: Next authentication method: publickey debug1: Trying private key: /c/Users/rabit/.ssh/id_rsa debug1: Trying private key: /c/Users/rabit/.ssh/id_dsa debug1: Trying private key: /c/Users/rabit/.ssh/id_ecdsa debug1: Trying private key: /c/Users/rabit/.ssh/id_ed25519 debug1: No more authentication methods to try. Permission denied (publickey).

  21. Fahad PK

    $ ssh -vvv git@bitbucket.org -i ~/.ssh/key

    OpenSSH_7.1p1, OpenSSL 1.0.2d 9 Jul 2015 debug1: Reading configuration data /etc/ssh/ssh_config debug2: ssh_connect: needpriv 0 debug1: Connecting to bitbucket.org [104.192.143.2] port 22. debug1: Connection established. debug1: identity file /c/Users/rabit/.ssh/key type 1 debug1: key_load_public: No such file or directory debug1: identity file /c/Users/rabit/.ssh/key-cert type -1 debug1: Enabling compatibility mode for protocol 2.0 debug1: Local version string SSH-2.0-OpenSSH_7.1 debug1: Remote protocol version 2.0, remote software version OpenSSH_5.3 debug1: match: OpenSSH_5.3 pat OpenSSH_5* compat 0x0c000000 debug2: fd 3 setting O_NONBLOCK debug1: Authenticating to bitbucket.org:22 as 'git' debug3: hostkeys_foreach: reading file "/c/Users/rabit/.ssh/known_hosts" debug3: record_hostkey: found key type RSA in file /c/Users/rabit/.ssh/known_hosts:1 debug3: load_hostkeys: loaded 1 keys from bitbucket.org debug3: order_hostkeyalgs: prefer hostkeyalgs: ssh-rsa-cert-v01@openssh.com,ssh-rsa debug1: SSH2_MSG_KEXINIT sent debug1: SSH2_MSG_KEXINIT received debug2: kex_parse_kexinit: curve25519-sha256@libssh.org,ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group-exchange-sha256,diffie-hellman-group-exchange-sha1,diffie-hellman-group14-sha1 debug2: kex_parse_kexinit: ssh-rsa-cert-v01@openssh.com,ssh-rsa,ecdsa-sha2-nistp256-cert-v01@openssh.com,ecdsa-sha2-nistp384-cert-v01@openssh.com,ecdsa-sha2-nistp521-cert-v01@openssh.com,ssh-ed25519-cert-v01@openssh.com,ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521,ssh-ed25519 debug2: kex_parse_kexinit: chacha20-poly1305@openssh.com,aes128-ctr,aes192-ctr,aes256-ctr,aes128-gcm@openssh.com,aes256-gcm@openssh.com,arcfour256,arcfour128,aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,aes192-cbc,aes256-cbc,arcfour,rijndael-cbc@lysator.liu.se debug2: kex_parse_kexinit: chacha20-poly1305@openssh.com,aes128-ctr,aes192-ctr,aes256-ctr,aes128-gcm@openssh.com,aes256-gcm@openssh.com,arcfour256,arcfour128,aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,aes192-cbc,aes256-cbc,arcfour,rijndael-cbc@lysator.liu.se debug2: kex_parse_kexinit: umac-64-etm@openssh.com,umac-128-etm@openssh.com,hmac-sha2-256-etm@openssh.com,hmac-sha2-512-etm@openssh.com,hmac-sha1-etm@openssh.com,umac-64@openssh.com,umac-128@openssh.com,hmac-sha2-256,hmac-sha2-512,hmac-sha1,hmac-md5-etm@openssh.com,hmac-ripemd160-etm@openssh.com,hmac-sha1-96-etm@openssh.com,hmac-md5-96-etm@openssh.com,hmac-md5,hmac-ripemd160,hmac-ripemd160@openssh.com,hmac-sha1-96,hmac-md5-96 debug2: kex_parse_kexinit: umac-64-etm@openssh.com,umac-128-etm@openssh.com,hmac-sha2-256-etm@openssh.com,hmac-sha2-512-etm@openssh.com,hmac-sha1-etm@openssh.com,umac-64@openssh.com,umac-128@openssh.com,hmac-sha2-256,hmac-sha2-512,hmac-sha1,hmac-md5-etm@openssh.com,hmac-ripemd160-etm@openssh.com,hmac-sha1-96-etm@openssh.com,hmac-md5-96-etm@openssh.com,hmac-md5,hmac-ripemd160,hmac-ripemd160@openssh.com,hmac-sha1-96,hmac-md5-96 debug2: kex_parse_kexinit: none,zlib@openssh.com,zlib debug2: kex_parse_kexinit: none,zlib@openssh.com,zlib debug2: kex_parse_kexinit: debug2: kex_parse_kexinit: debug2: kex_parse_kexinit: first_kex_follows 0 debug2: kex_parse_kexinit: reserved 0 debug2: kex_parse_kexinit: diffie-hellman-group-exchange-sha256,diffie-hellman-group-exchange-sha1,diffie-hellman-group14-sha1,diffie-hellman-group1-sha1 debug2: kex_parse_kexinit: ssh-rsa,ssh-dss debug2: kex_parse_kexinit: aes128-ctr,aes192-ctr,aes256-ctr,arcfour256,arcfour128,aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,aes192-cbc,aes256-cbc,arcfour,rijndael-cbc@lysator.liu.se debug2: kex_parse_kexinit: aes128-ctr,aes192-ctr,aes256-ctr,arcfour256,arcfour128,aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,aes192-cbc,aes256-cbc,arcfour,rijndael-cbc@lysator.liu.se debug2: kex_parse_kexinit: hmac-md5,hmac-sha1,umac-64@openssh.com,hmac-ripemd160,hmac-ripemd160@openssh.com,hmac-sha1-96,hmac-md5-96 debug2: kex_parse_kexinit: hmac-md5,hmac-sha1,umac-64@openssh.com,hmac-ripemd160,hmac-ripemd160@openssh.com,hmac-sha1-96,hmac-md5-96 debug2: kex_parse_kexinit: none,zlib@openssh.com debug2: kex_parse_kexinit: none,zlib@openssh.com debug2: kex_parse_kexinit: debug2: kex_parse_kexinit: debug2: kex_parse_kexinit: first_kex_follows 0 debug2: kex_parse_kexinit: reserved 0 debug1: kex: server->client aes128-ctr umac-64@openssh.com none debug1: kex: client->server aes128-ctr umac-64@openssh.com none debug1: SSH2_MSG_KEX_DH_GEX_REQUEST(1024<3072<8192) sent debug1: got SSH2_MSG_KEX_DH_GEX_GROUP debug2: bits set: 1552/3072 debug1: SSH2_MSG_KEX_DH_GEX_INIT sent debug1: got SSH2_MSG_KEX_DH_GEX_REPLY debug1: Server host key: ssh-rsa SHA256:zzXQOXSRBEiUtuE8AikJYKwbHaxvSc0ojez9YXaGp1A debug3: hostkeys_foreach: reading file "/c/Users/rabit/.ssh/known_hosts" debug3: record_hostkey: found key type RSA in file /c/Users/rabit/.ssh/known_hosts:1 debug3: load_hostkeys: loaded 1 keys from bitbucket.org debug3: hostkeys_foreach: reading file "/c/Users/rabit/.ssh/known_hosts" debug3: record_hostkey: found key type RSA in file /c/Users/rabit/.ssh/known_hosts:2 debug3: load_hostkeys: loaded 1 keys from 104.192.143.2 debug1: Host 'bitbucket.org' is known and matches the RSA host key. debug1: Found key in /c/Users/rabit/.ssh/known_hosts:1 debug2: bits set: 1572/3072 debug2: set_newkeys: mode 1 debug1: SSH2_MSG_NEWKEYS sent debug1: expecting SSH2_MSG_NEWKEYS debug2: set_newkeys: mode 0 debug1: SSH2_MSG_NEWKEYS received debug1: Roaming not allowed by server debug1: SSH2_MSG_SERVICE_REQUEST sent debug2: service_accept: ssh-userauth debug1: SSH2_MSG_SERVICE_ACCEPT received debug2: key: /c/Users/rabit/.ssh/key (0x60005f6d0), explicit debug1: Authentications that can continue: publickey debug3: start over, passed a different list publickey debug3: preferred publickey,keyboard-interactive,password debug3: authmethod_lookup publickey debug3: remaining preferred: keyboard-interactive,password debug3: authmethod_is_enabled publickey debug1: Next authentication method: publickey debug1: Offering RSA public key: /c/Users/rabit/.ssh/key debug3: send_pubkey_test debug2: we sent a publickey packet, wait for reply debug1: Remote: Forced command: conq username:fahadpk92 debug1: Remote: Port forwarding disabled. debug1: Remote: X11 forwarding disabled. debug1: Remote: Agent forwarding disabled. debug1: Remote: Pty allocation disabled. debug1: Server accepts key: pkalg ssh-rsa blen 279 debug2: input_userauth_pk_ok: fp SHA256:L/p+uzdReqFvZs+aPIWZT5CLvmwHauFoFzWSYdBRFfY debug3: sign_and_send_pubkey: RSA SHA256:L/p+uzdReqFvZs+aPIWZT5CLvmwHauFoFzWSYdBRFfY Enter passphrase for key '/c/Users/rabit/.ssh/key': debug1: Remote: Forced command: conq username:fahadpk92 debug1: Remote: Port forwarding disabled. debug1: Remote: X11 forwarding disabled. debug1: Remote: Agent forwarding disabled. debug1: Remote: Pty allocation disabled. debug1: Authentication succeeded (publickey). Authenticated to bitbucket.org ([104.192.143.2]:22). debug1: channel 0: new [client-session] debug3: ssh_session2_open: channel_new: 0 debug2: channel 0: send open debug1: Requesting no-more-sessions@openssh.com debug1: Entering interactive session. debug2: callback start debug2: fd 3 setting TCP_NODELAY debug3: ssh_packet_set_tos: set IP_TOS 0x10 debug2: client_session2_setup: id 0 debug2: channel 0: request pty-req confirm 1 debug2: channel 0: request shell confirm 1 debug2: callback done debug2: channel 0: open confirm rwindow 0 rmax 32768 debug2: channel_input_status_confirm: type 100 id 0 PTY allocation request failed on channel 0 debug2: channel 0: rcvd adjust 2097152 debug2: channel_input_status_confirm: type 99 id 0 debug2: shell request accepted on channel 0 logged in as fahadpk92.

    You can use git or hg to connect to Bitbucket. Shell access is disabled. debug1: client_input_channel_req: channel 0 rtype exit-status reply 0 debug1: client_input_channel_req: channel 0 rtype eow@openssh.com reply 0 debug2: channel 0: rcvd eow debug2: channel 0: close_read debug2: channel 0: input open -> closed debug2: channel 0: rcvd eof debug2: channel 0: output open -> drain debug2: channel 0: obuf empty debug2: channel 0: close_write debug2: channel 0: output drain -> closed debug2: channel 0: rcvd close debug3: channel 0: will not send data after close debug2: channel 0: almost dead debug2: channel 0: gc: notify user debug2: channel 0: gc: user detached debug2: channel 0: send close debug2: channel 0: is dead debug2: channel 0: garbage collecting debug1: channel 0: free: client-session, nchannels 1 debug3: channel 0: status: The following connections are open: #0 client-session (t4 r0 i3/0 o3/0 fd -1/-1 cc -1)

    Connection to bitbucket.org closed. Transferred: sent 3840, received 3416 bytes, in 0.5 seconds Bytes per second: sent 7610.5, received 6770.1 debug1: Exit status 0

  22. Fahad PK

    Issue solved when I created key in git bash without giving any name or location (with default name and location) and then adding the public key to bit bucket. all these time I was creating key with a name in another location and pasting it to '.ssh' folder and adding the public key to bit bucket.

  23. Rowan Shead

    Hi having the same problem I used this comand ssh -vvv git@bitbucket.org -i /.ssh/id_dsa.pub

    RowanSheadsMBP:testing_twilio rowanshead$ ssh -vvv git@bitbucket.org -i ~/.ssh/id_rsa OpenSSH_6.9p1, LibreSSL 2.1.8 debug1: Reading configuration data /etc/ssh/ssh_config debug1: /etc/ssh/ssh_config line 21: Applying options for debug2: ssh_connect: needpriv 0 debug1: Connecting to bitbucket.org [104.192.143.2] port 22. debug1: Connection established. debug1: identity file /Users/rowanshead/.ssh/id_rsa type 1 debug1: key_load_public: No such file or directory debug1: identity file /Users/rowanshead/.ssh/id_rsa-cert type -1 debug1: Enabling compatibility mode for protocol 2.0 debug1: Local version string SSH-2.0-OpenSSH_6.9 debug1: Remote protocol version 2.0, remote software version OpenSSH_6.4 debug1: match: OpenSSH_6.4 pat OpenSSH compat 0x04000000 debug2: fd 5 setting O_NONBLOCK debug1: Authenticating to bitbucket.org:22 as 'git' debug3: hostkeys_foreach: reading file "/Users/rowanshead/.ssh/known_hosts" debug3: record_hostkey: found key type RSA in file /Users/rowanshead/.ssh/known_hosts:4 debug3: load_hostkeys: loaded 1 keys from bitbucket.org debug3: order_hostkeyalgs: prefer hostkeyalgs: ssh-rsa-cert-v01@openssh.com,ssh-rsa-cert-v00@openssh.com,ssh-rsa debug1: SSH2_MSG_KEXINIT sent debug1: SSH2_MSG_KEXINIT received debug2: kex_parse_kexinit: curve25519-sha256@libssh.org,ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group-exchange-sha256,diffie-hellman-group-exchange-sha1,diffie-hellman-group14-sha1,diffie-hellman-group1-sha1 debug2: kex_parse_kexinit: ssh-rsa-cert-v01@openssh.com,ssh-rsa-cert-v00@openssh.com,ssh-rsa,ecdsa-sha2-nistp256-cert-v01@openssh.com,ecdsa-sha2-nistp384-cert-v01@openssh.com,ecdsa-sha2-nistp521-cert-v01@openssh.com,ssh-ed25519-cert-v01@openssh.com,ssh-dss-cert-v01@openssh.com,ssh-dss-cert-v00@openssh.com,ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521,ssh-ed25519,ssh-dss debug2: kex_parse_kexinit: chacha20-poly1305@openssh.com,aes128-ctr,aes192-ctr,aes256-ctr,aes128-gcm@openssh.com,aes256-gcm@openssh.com,arcfour256,arcfour128,aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,aes192-cbc,aes256-cbc,arcfour,rijndael-cbc@lysator.liu.se debug2: kex_parse_kexinit: chacha20-poly1305@openssh.com,aes128-ctr,aes192-ctr,aes256-ctr,aes128-gcm@openssh.com,aes256-gcm@openssh.com,arcfour256,arcfour128,aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,aes192-cbc,aes256-cbc,arcfour,rijndael-cbc@lysator.liu.se debug2: kex_parse_kexinit: umac-64-etm@openssh.com,umac-128-etm@openssh.com,hmac-sha2-256-etm@openssh.com,hmac-sha2-512-etm@openssh.com,hmac-sha1-etm@openssh.com,umac-64@openssh.com,umac-128@openssh.com,hmac-sha2-256,hmac-sha2-512,hmac-sha1,hmac-md5-etm@openssh.com,hmac-ripemd160-etm@openssh.com,hmac-sha1-96-etm@openssh.com,hmac-md5-96-etm@openssh.com,hmac-md5,hmac-ripemd160,hmac-ripemd160@openssh.com,hmac-sha1-96,hmac-md5-96 debug2: kex_parse_kexinit: umac-64-etm@openssh.com,umac-128-etm@openssh.com,hmac-sha2-256-etm@openssh.com,hmac-sha2-512-etm@openssh.com,hmac-sha1-etm@openssh.com,umac-64@openssh.com,umac-128@openssh.com,hmac-sha2-256,hmac-sha2-512,hmac-sha1,hmac-md5-etm@openssh.com,hmac-ripemd160-etm@openssh.com,hmac-sha1-96-etm@openssh.com,hmac-md5-96-etm@openssh.com,hmac-md5,hmac-ripemd160,hmac-ripemd160@openssh.com,hmac-sha1-96,hmac-md5-96 debug2: kex_parse_kexinit: none,zlib@openssh.com,zlib debug2: kex_parse_kexinit: none,zlib@openssh.com,zlib debug2: kex_parse_kexinit: debug2: kex_parse_kexinit: debug2: kex_parse_kexinit: first_kex_follows 0 debug2: kex_parse_kexinit: reserved 0 debug2: kex_parse_kexinit: ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group-exchange-sha256,diffie-hellman-group-exchange-sha1,diffie-hellman-group14-sha1,diffie-hellman-group1-sha1 debug2: kex_parse_kexinit: ssh-dss,ssh-rsa debug2: kex_parse_kexinit: aes128-ctr,aes192-ctr,aes256-ctr,arcfour256,arcfour128,aes128-gcm@openssh.com,aes256-gcm@openssh.com,aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,aes192-cbc,aes256-cbc,arcfour,rijndael-cbc@lysator.liu.se debug2: kex_parse_kexinit: aes128-ctr,aes192-ctr,aes256-ctr,arcfour256,arcfour128,aes128-gcm@openssh.com,aes256-gcm@openssh.com,aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,aes192-cbc,aes256-cbc,arcfour,rijndael-cbc@lysator.liu.se debug2: kex_parse_kexinit: hmac-md5-etm@openssh.com,hmac-sha1-etm@openssh.com,umac-64-etm@openssh.com,umac-128-etm@openssh.com,hmac-sha2-256-etm@openssh.com,hmac-sha2-512-etm@openssh.com,hmac-ripemd160-etm@openssh.com,hmac-sha1-96-etm@openssh.com,hmac-md5-96-etm@openssh.com,hmac-md5,hmac-sha1,umac-64@openssh.com,umac-128@openssh.com,hmac-sha2-256,hmac-sha2-512,hmac-ripemd160,hmac-ripemd160@openssh.com,hmac-sha1-96,hmac-md5-96 debug2: kex_parse_kexinit: hmac-md5-etm@openssh.com,hmac-sha1-etm@openssh.com,umac-64-etm@openssh.com,umac-128-etm@openssh.com,hmac-sha2-256-etm@openssh.com,hmac-sha2-512-etm@openssh.com,hmac-ripemd160-etm@openssh.com,hmac-sha1-96-etm@openssh.com,hmac-md5-96-etm@openssh.com,hmac-md5,hmac-sha1,umac-64@openssh.com,umac-128@openssh.com,hmac-sha2-256,hmac-sha2-512,hmac-ripemd160,hmac-ripemd160@openssh.com,hmac-sha1-96,hmac-md5-96 debug2: kex_parse_kexinit: none,zlib@openssh.com debug2: kex_parse_kexinit: none,zlib@openssh.com debug2: kex_parse_kexinit: debug2: kex_parse_kexinit: debug2: kex_parse_kexinit: first_kex_follows 0 debug2: kex_parse_kexinit: reserved 0 debug1: kex: server->client aes128-ctr umac-64-etm@openssh.com none debug1: kex: client->server aes128-ctr umac-64-etm@openssh.com none debug1: sending SSH2_MSG_KEX_ECDH_INIT debug1: expecting SSH2_MSG_KEX_ECDH_REPLY debug1: Server host key: ssh-rsa SHA256:zzXQOXSRBEiUtuE8AikJYKwbHaxvSc0ojez9YXaGp1A debug3: hostkeys_foreach: reading file "/Users/rowanshead/.ssh/known_hosts" debug3: record_hostkey: found key type RSA in file /Users/rowanshead/.ssh/known_hosts:4 debug3: load_hostkeys: loaded 1 keys from bitbucket.org debug3: hostkeys_foreach: reading file "/Users/rowanshead/.ssh/known_hosts" debug3: record_hostkey: found key type RSA in file /Users/rowanshead/.ssh/known_hosts:6 debug3: load_hostkeys: loaded 1 keys from 104.192.143.2 debug1: Host 'bitbucket.org' is known and matches the RSA host key. debug1: Found key in /Users/rowanshead/.ssh/known_hosts:4 debug2: set_newkeys: mode 1 debug1: SSH2_MSG_NEWKEYS sent debug1: expecting SSH2_MSG_NEWKEYS debug2: set_newkeys: mode 0 debug1: SSH2_MSG_NEWKEYS received debug1: Roaming not allowed by server debug1: SSH2_MSG_SERVICE_REQUEST sent debug2: service_accept: ssh-userauth debug1: SSH2_MSG_SERVICE_ACCEPT received debug2: key: /Users/rowanshead/.ssh/id_rsa (0x7fceeaf00050), explicit debug1: Authentications that can continue: publickey debug3: start over, passed a different list publickey debug3: preferred publickey,keyboard-interactive,password debug3: authmethod_lookup publickey debug3: remaining preferred: keyboard-interactive,password debug3: authmethod_is_enabled publickey debug1: Next authentication method: publickey debug1: Offering RSA public key: /Users/rowanshead/.ssh/id_rsa debug3: send_pubkey_test debug2: we sent a publickey packet, wait for reply debug1: Authentications that can continue: publickey debug2: we did not send a packet, disable method debug1: No more authentication methods to try. Permission denied (publickey).

    Thanks for your help

  24. Jackye Caraballo

    Im having the same issue. I added an ssh key in bitbucket for my work account, then added another ssh key to my private bitbucket account and thats when things started acting crazy. The public key is added to my account and my firewall is turned off. Here are he results when I enter ssh -v git@bitbucket.org OpenSSH_6.9p1, LibreSSL 2.1.8.Screen Shot 2016-04-01 at 3.20.15 PM.png

    Any help is appreciated!

  25. pramote soongkitboon

    Same problem.

    "Warning: Permanently added the RSA host key for IP address '104.192.143.3' to the list of known hosts. Permission denied (publickey). fatal: The remote end hung up unexpectedly"

    result of ssh -v git@bitbucket.org comand

    ssh -v git@bitbucket.org

    OpenSSH_5.3p1, OpenSSL 1.0.1e-fips 11 Feb 2013 debug1: Reading configuration data /etc/ssh/ssh_config debug1: Applying options for debug1: Connecting to bitbucket.org [104.192.143.3] port 22. debug1: Connection established. debug1: permanently_set_uid: 0/0 debug1: identity file /root/.ssh/identity type -1 debug1: identity file /root/.ssh/identity-cert type -1 debug1: identity file /root/.ssh/id_rsa type -1 debug1: identity file /root/.ssh/id_rsa-cert type -1 debug1: identity file /root/.ssh/id_dsa type -1 debug1: identity file /root/.ssh/id_dsa-cert type -1 debug1: identity file /root/.ssh/id_ecdsa type -1 debug1: identity file /root/.ssh/id_ecdsa-cert type -1 debug1: Remote protocol version 2.0, remote software version OpenSSH_6.4 debug1: match: OpenSSH_6.4 pat OpenSSH debug1: Enabling compatibility mode for protocol 2.0 debug1: Local version string SSH-2.0-OpenSSH_5.3 debug1: SSH2_MSG_KEXINIT sent debug1: SSH2_MSG_KEXINIT received debug1: kex: server->client aes128-ctr hmac-md5 none debug1: kex: client->server aes128-ctr hmac-md5 none debug1: SSH2_MSG_KEX_DH_GEX_REQUEST(1024<1024<8192) sent debug1: expecting SSH2_MSG_KEX_DH_GEX_GROUP debug1: SSH2_MSG_KEX_DH_GEX_INIT sent debug1: expecting SSH2_MSG_KEX_DH_GEX_REPLY debug1: Host 'bitbucket.org' is known and matches the RSA host key. debug1: Found key in /root/.ssh/known_hosts:6 debug1: ssh_rsa_verify: signature correct debug1: SSH2_MSG_NEWKEYS sent debug1: expecting SSH2_MSG_NEWKEYS debug1: SSH2_MSG_NEWKEYS received debug1: SSH2_MSG_SERVICE_REQUEST sent debug1: SSH2_MSG_SERVICE_ACCEPT received debug1: Authentications that can continue: publickey debug1: Next authentication method: publickey debug1: Trying private key: /root/.ssh/identity debug1: Trying private key: /root/.ssh/id_rsa debug1: Trying private key: /root/.ssh/id_dsa debug1: Trying private key: /root/.ssh/id_ecdsa debug1: No more authentication methods to try. Permission denied (publickey).

  26. Log in to comment