SSH stopped working due to bad MAC spec

Everything about it! Heard the news? What! is Ubuntu bankrupt? Has Mandriva started marketing? Have you taken a sky diving course?
We just need to know! No flaming! And we hate spammers -Get it?

Moderators: b1o, jkerr82508

User avatar
viking60
Über-Berserk
Posts: 9351
Joined: 14 Mar 2010, 16:34

SSH stopped working due to bad MAC spec

Postby viking60 » 09 Nov 2017, 11:16

I have all my servers configured in ~/.ssh/config

I also use encryption key's and passwordless logins so that my password is not transported over networks.

This works so good that I never notice that some servers are on the other side of the globe.

But today I happily typed ssh viking60-server and got an error message :wall:

The message was

Code: Select all

/home/viking/.ssh/config line 2: Bad SSH2 Mac spec 'hmac-md5,hmac-sha1,hmac-ripemd160'.


My ~/.ssh/config has a few line on top where chiphers are specified

Code: Select all

Ciphers aes128-ctr,aes192-ctr,aes256-ctr,aes128-cbc,3des-cbc
MACs hmac-md5,hmac-sha1,hmac-ripemd160


The solution was to remove ,hmac-ripemd160 from the line - like this:

Code: Select all

Ciphers aes128-ctr,aes192-ctr,aes256-ctr,aes128-cbc,3des-cbc
MACs hmac-md5,hmac-sha1

After that ssh worked again!

Why this happened? I have no clue :confused maybe some mac encryption is obsolete or changed....
Manjaro 64bit on the main box -Intel(R) Core(TM) i7 CPU 920 @ 2.67GHz and nVidia Corporation GT200b [GeForce GTX 275] (rev a1. + Centos on the server - Arch on the laptop.
"There are no stupid questions - Only stupid answers!"

User avatar
R_Head
Berserk
Posts: 2819
Joined: 17 Mar 2010, 15:40

Re: SSH stopped working due to bad MAC spec

Postby R_Head » 09 Nov 2017, 14:22

The Russians did it :lol:

User avatar
viking60
Über-Berserk
Posts: 9351
Joined: 14 Mar 2010, 16:34

Re: SSH stopped working due to bad MAC spec

Postby viking60 » 09 Nov 2017, 14:26

:lolup Yup - it is always them..
Manjaro 64bit on the main box -Intel(R) Core(TM) i7 CPU 920 @ 2.67GHz and nVidia Corporation GT200b [GeForce GTX 275] (rev a1. + Centos on the server - Arch on the laptop.
"There are no stupid questions - Only stupid answers!"

User avatar
viking60
Über-Berserk
Posts: 9351
Joined: 14 Mar 2010, 16:34

Re: SSH stopped working due to bad MAC spec

Postby viking60 » 10 Nov 2017, 12:27

I had a discussion in the Manjaro forum where I questioned the need for ciphers and MACs in ~/.ssh/config since ssh will work without them.
The answer seems to be that the client config file constitutes a list of preferences so if the server offers both weak and strong algorithms; then your list will make it "send" the strongest one (the first in your list).
:A
https://forum.manjaro.org/t/ssh-stopped ... c/34436/10

So my ~/.ssh/config now looks like this:

Code: Select all

Ciphers chacha20-poly1305@openssh.com,aes256-gcm@openssh.com,aes128-gcm@openssh.com,aes256-ctr,aes192-ctr,aes128-ctr
MACs hmac-sha2-512-etm@openssh.com,hmac-sha2-256-etm@openssh.com,umac-128-etm@openssh.com,hmac-sha2-512,hmac-sha2-256,umac-128@openssh.com


That should pick the best alternatives first (or the best alternative the server has to offer).
Manjaro 64bit on the main box -Intel(R) Core(TM) i7 CPU 920 @ 2.67GHz and nVidia Corporation GT200b [GeForce GTX 275] (rev a1. + Centos on the server - Arch on the laptop.
"There are no stupid questions - Only stupid answers!"


Return to “The Lounge”