running ssh command in the cmd shows me 'Bad configuration option: pubkeyacceptedalgorithms'

Viewed 794

In the cmd prompt I tried to connect to my server via ssh with following command: ssh ubuntu@xx.xx.xx.xx

but an error message occured

C:\\Users\\jjid/.ssh/config: line 4: Bad configuration option: pubkeyacceptedalgorithms
C:\\Users\\jjid/.ssh/config: terminating, 1 bad configuration options

I checked ssh configuration file and the content,

Host yy.yy.yy.yy
    KexAlgorithms +diffie-hellman-group1-sha1
    HostKeyAlgorithms +ssh-rsa
    PubKeyAcceptedAlgorithms +ssh-rsa

If I clear the file, ssh command works. But I must have that configuration.

How do I fix it?

1 Answers

The SSH version is too low. The option PubKeyAcceptedAlgorithms is supported from OpenSSH version 8.5 and above.

An alternative to upgrade is to use the old name PubkeyAcceptedKeyTypes as it was simply renamed from version 8.5. Link to 8.5 release notes

Related