Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

SSH connection Hosting server to Bitbucket : Host key verification failed.

Jeremy Armengaud February 19, 2018

Hi,

I am trying to push my initial commit from my repo on my hosting server to my central repo on bitbucket via : git push -u origin master ==> NOK

Result : Host key verification failed.

Then I try to verify my SSH connection between my hosting server and bitbucket.

To do so I connect via SSH to my hosting server ==> OK

$ ssh -T xxx@uk21.siteground.eu -p 18765

from there I attempt a ssh connection to bitbucket ==> NOK

ssh -v git@bitbucket.org

SiteGround_Incp1, OpenSSL 0.9.8e-fips-rhel5 01 Jul 2008
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 3: Applying options for *
Pseudo-terminal will not be allocated because stdin is not a terminal.
debug1: Connecting to bitbucket.org [104.192.143.3] port 22.
debug1: Connection established.
debug1: identity file /home/xxx/.ssh/id_rsa type 1
debug1: identity file /home/xxx/.ssh/id_rsa-cert type -1
debug1: identity file /home/xxx/.ssh/id_dsa type -1
debug1: identity file /home/xxx/.ssh/id_dsa-cert type -1
debug1: Remote protocol version 2.0, remote software version conker_1.1.1-306b384 app-133
debug1: no match: conker_1.1.1-306b384 app-133
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-SiteGround_Inc
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug1: kex: server->client aes128-ctr hmac-sha1 none
debug1: kex: client->server aes128-ctr hmac-sha1 none
debug1: sending SSH2_MSG_KEXDH_INIT
debug1: expecting SSH2_MSG_KEXDH_REPLY
debug1: Server host key: RSA 97:8c:1b:f2:6f:14:6b:5c:3b:ec:aa:46:46:74:7c:40
debug1: read_passphrase: can't open /dev/tty: No such device or address
Host key verification failed.

I would be grateful for any advice.

3 answers

1 vote
jredmond
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
March 20, 2018

This last line:

debug1: read_passphrase: can't open /dev/tty: No such device or address

as well as this line near the beginning of the session:

Pseudo-terminal will not be allocated because stdin is not a terminal.

both suggest that your key has a passphrase, and that you're trying to use the key someplace where you are unable to provide the passphrase. Is that the case here?

garethhallnz June 29, 2019

I have the same issue and my sshkey does not have passphrase.

1 vote
Lonnie
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
March 20, 2018

In the interest of time, you might want to try regenerating a new host key 

ssh-keygen -R bitbucket.org

This command to remove entries from known_hosts

When you try an connect it again it should rewrite it.

Going off of the following error:

debug1: read_passphrase: can't open /dev/tty: No such device or address
Host key verification failed.

0 votes
Lonnie
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
March 20, 2018

Hello Team, I am sure why are you are seeing this issue. Can you increase the debug level

ssh -vvv git@bitbucket.org 

This should show us what is going on.

Thanks

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events