ssh - Unable to negotiate with x.y.z.q port 22: Their offer: ssh-rsa,ssh-dss

Hi, after recent updates I have problems connecting with ssh with some remote hosts, ssh client terminate with this error:

Unable to negotiate with x.y.z.q port 22: no matching host key type found. Their offer: ssh-rsa,ssh-dss

I already found that -o option does the trick: -oHostKeyAlgorithms=+ssh-rsa
but having lots of servers to connect to I’d like a more general solution so I tried creating a ssh_config file in my ~/.ssh dir

Host x.y.*.*
        HostkeyAlgorithms +ssh-rsa
        PubkeyAcceptedAlgorithms +ssh-rsa

but seems it is ignored.

Can someone give me an hint on this?

thanks,
Marco

Hi, have you tried adding them to /etc/ssh/ssh_config? Leap does not mind them (yet), so I cannot test it, but on ubuntu I came across this (stupid, but simple) solution :wink: You will have to modify keys your old systems do support, I use o[FONT=monospace]ld openwrt, which uses [FONT=monospace][FONT=monospace]+diffie-hellman-group1-sha1[/FONT].[/FONT][/FONT]

[FONT=monospace]alias oldssh="ssh -oKexAlgorithms=+diffie-hellman-group1-sha1"
oldssh me@wherever -p port

[/FONT]

Checking my own “~/.ssh” directory, I note that the file is called “config” rather than “ssh_config”.

YES!! :slight_smile: Thanks a lot!

I was at only four characters from the solution :slight_smile:

Marco

I already found that -o option does the trick: -oHostKeyAlgorithms=+ssh-rsa
but having lots of servers to connect to I’d like a more general solution so I tried creating a ssh_config file in my ~/.ssh dir

There was a change about rsa, see openssh-changelog.