Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

How to add a git remote using ssh with "-oHostKeyAlgorithms=+ssh-dss" needed?

LMD
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
February 19, 2023

Hi Everyone. I am having an issue adding a git remote to push to my production server that is hosted with GoDaddy. 

For example I use to be able to add it like this at it worked fine:

git add remote beta ssh://username@mysite.com/~/gitrepos/myrepo.git

When trying to push the beta I now get this error:

Unable to negotiate with "ip of server" port 22: no matching host key type found. Their offer: ssh-rsa,ssh-rsa-cert-v01@openssh.com,ssh-dss
fatal: Could not read from remote repository.

I then thought it was the ssh key so I created a new one. Imported the public key to GoDaddy and tested a connection in the terminal:

ssh username@mysite.com

And got the same error as above "Unable to negotiate..."

I then found out I had to use the following ssh flag "-oHostKeyAlgorithms=+ssh-dss" in order to connect successfully:

ssh -oHostKeyAlgorithms=+ssh-dss username@mysite.com

So my question is... How do I add this new ssh flag "-oHostKeyAlgorithms=+ssh-dss" to the git remote?

1 answer

1 accepted

0 votes
Answer accepted
LMD
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
February 19, 2023

I figure out my issue. I had to add the following in my .ssh/config file:

PubkeyAcceptedAlgorithms +ssh-rsa
HostkeyAlgorithms +ssh-rsa

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events