Skip to content

Avoid checking deprecated optinos for OpenSSH >=7.6#110

Merged
chris-rock merged 1 commit into
dev-sec:masterfrom
artem-forks:ubuntu-18
Aug 1, 2018
Merged

Avoid checking deprecated optinos for OpenSSH >=7.6#110
chris-rock merged 1 commit into
dev-sec:masterfrom
artem-forks:ubuntu-18

Conversation

@artem-sidorenko
Copy link
Copy Markdown
Member

E.g. on Ubuntu 18.04

Signed-off-by: Artem Sidorenko artem@posteo.de

@artem-sidorenko
Copy link
Copy Markdown
Member Author

Copy link
Copy Markdown

@frederikbosch frederikbosch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The approach looks good to me. The main issue here is how to be sure that we parse the output of ssh -V correctly across different operating systems. This seems correct for Ubuntu, my own OS. Hopefully this works for the others too.

E.g. on Ubuntu 18.04

SSH protocol version 1 was removed from OpenSSH 7.6:
- https://www.openssh.com/txt/release-7.6
- https://www.openssh.com/txt/release-7.5

Signed-off-by: Artem Sidorenko <artem@posteo.de>
@artem-sidorenko artem-sidorenko changed the title Avoid checking deprecated optinos for OpenSSH >7.4 Avoid checking deprecated optinos for OpenSSH >=7.6 Aug 1, 2018
@artem-sidorenko
Copy link
Copy Markdown
Member Author

@frederikbosch thanks! I tested it with test-kitchen from chef-os-hardening on all supported platforms, it looks good

Copy link
Copy Markdown
Member

@chris-rock chris-rock left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great improvement @artem-sidorenko

Comment thread controls/ssh_spec.rb
command('ssh').exist?
end

ssh_version = command('ssh -V 2>&1 | cut -f1 -d" " | cut -f2 -d"_"').stdout.to_f
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we do this in a resource, so that we could reuse it for other test too in the future?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lets do it once we need it?

@chris-rock chris-rock merged commit aa4eb82 into dev-sec:master Aug 1, 2018
@artem-sidorenko artem-sidorenko deleted the ubuntu-18 branch August 1, 2018 10:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants