Skip to content
This repository has been archived by the owner on Dec 26, 2020. It is now read-only.

line 56: Bad SSH2 mac spec #135

Closed
snakelab opened this issue Oct 12, 2017 · 5 comments · Fixed by #139
Closed

line 56: Bad SSH2 mac spec #135

snakelab opened this issue Oct 12, 2017 · 5 comments · Fixed by #139
Assignees
Labels

Comments

@snakelab
Copy link

Distributor ID: Debian
Description: Debian GNU/Linux 8.7 (jessie)
Release: 8.7
Codename: jessie

I get the following error at running this role:

[...]  line 56: Bad SSH2 mac spec 'hmac-sha2-512-etm@openssh.com,hmac-sha2-256-etm@openssh.com,hmac-ripemd160-etm@openssh.com,umac-128-etm@openssh.com,hmac-sha2-512,hmac-sha2-256,hmac-ripemd160

Any hint on this?

thanks

@snakelab
Copy link
Author

ping

@rndmh3ro rndmh3ro added the bug label Oct 17, 2017
@rndmh3ro
Copy link
Member

Never heard of this before.
Travis says its fine: https://travis-ci.org/dev-sec/ansible-ssh-hardening/jobs/289021694

I'll have to take a closer look.

Can you try to single out which mac is "bad" by removing them here: https://github.com/dev-sec/ansible-ssh-hardening/blob/master/defaults/main.yml ?

@HaleTom
Copy link

HaleTom commented Oct 24, 2017

 * ssh(1)/sshd(8): remove support for the hmac-ripemd160 MAC.

https://www.openssh.com/txt/release-7.6

@rndmh3ro
Copy link
Member

That seems to explain it, yes.
As a workaround, delete the MACs https://github.com/dev-sec/ansible-ssh-hardening/blob/master/defaults/main.yml#L141 and https://github.com/dev-sec/ansible-ssh-hardening/blob/master/defaults/main.yml#L145 or overwrite the list.

For fixing this, that's another, slightly bigger problem. Right now we're setting the MACs, Ciphers and KEX according to the operation system used.
This should be changed to check for the openssh version instead. The sshd-version is already checked for and registered in the variable sshd_version. So one should only have to change the template.
Or even better: set the variables for MACS, Ciphers and KEX in the playbook and just use it in the template, without any if-else clauses.

@rndmh3ro rndmh3ro self-assigned this Oct 29, 2017
@francoisbeaulieu
Copy link

One particularity that I noticed, at least on MacOS is that it complains even if the offending MAC entry is for a different host definition in ssh_config than the one git is currently connecting to. Seems the test is a little too loose in detecting the line in the config file.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants