PTY allocation request failed on channel 0
authenticated via ssh key.
You can use git to connect to Bitbucket. Shell access is disabled
Connection to bitbucket.org closed.
I was trying to update the SSH key for the bitbucket to continue my work. But I am unable to do that because VS coed says Git: Host key verification failed.
Hi @Jagadeesh_ Neeruganti and welcome to the community.
The message PTY allocation request failed on channel 0 can be removed if you run the following command instead:
ssh -T git@bitbcuket.org
However, this specific line is not the issue. The previous lines in the output mention that there is an entry in the ~/.ssh/known_hosts file on your machine that has a different host key (probably the old key) for 18.205.93.1 (this is one of the IPs of Bitbucket Cloud).
You can open this file in an editor on your machine, remove this specific entry and save the file.
When you are getting such a warning asking you to continue the connection to Bitbucket Cloud and warning you about the fingerprint, please always ensure that the fingerprint shown in the output matches one of the fingerprints listed here in the section SSH Host Keys:
Please feel free to let me know how it goes and if you need further assistance.
Kind regards,
Theodora
When I try to push my code to my remote branch in VS code, I am getting this error. Can you please provide steps on how to add the host key? Because I am trying for the past two days, I will get the same console that I sent earlier.
Can you please help me with this?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
First, it is important to know which SSH client you are using. If you are using OpenSSH or a compatible client that uses the file ~/.ssh/known_hosts in your system, you can:
Afterwards, if you are getting any error about "Offending key for IP" in the ~/.ssh/known_hosts file, you will need to remove from the file this specific entry with the IP mentioned in the error message.
In case you are using another SSH client, we have an FAQ page with questions and answers about some other SSH clients:
Kind regards,
Theodora
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.