Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

could ssh-audit print desired config or add Generic guide documentation #191

Open
daniejstriata opened this issue May 15, 2023 · 3 comments

Comments

@daniejstriata
Copy link

daniejstriata commented May 15, 2023

Can ssh-audit not print out the desired sshd config as an option or will it be possible to add a generic section to the guides? There are no guides for RHEL 9 based distros yet. I have some items I'm unsure how to resolve. Like:

  • key algorithm to change (increase modulus size to 3072 bits or larger)
    I have updated my moduli from the commands given in the hardening guide.
@daniejstriata daniejstriata changed the title Generic guide documentation could ssh-audit print desired config or add Generic guide documentation May 15, 2023
@jtesta
Copy link
Owner

jtesta commented Jun 20, 2023

an ssh-audit not print out the desired sshd config as an option

This would require ssh-audit to be able to precisely identify the server's precise OpenSSH version. This isn't as easy as it sounds, as some distros back-port changes without bumping version numbers.

will it be possible to add a generic section to the guides?

I'm not sure what you mean here. The guides are very specific to each OS/platform otherwise the commands would fail.

I have some items I'm unsure how to resolve. Like: key algorithm to change (increase modulus size to 3072 bits or larger)

Sounds like this is a failure related to your RSA host keys. This would be fixed by re-generating them using ssh-keygen -t rsa -b 3072 -f /path/to/your/RSA/key

@daniejstriata
Copy link
Author

daniejstriata commented Jun 20, 2023

@jtesta
I'm happy with the existing process and just thought if there could be a desired config for a distro as is currently done from the website then I could harden sites without access to the internet but then I can just as well get the commands before the hardening is applied.
I thought something like:

ssh-audit --Centos7-sshd_config or
ssh-audit --RHEL9-sshd_config
ssh-audit --RHEL9-ssh_config
and print out the same command you'd find on the web for those distros.

What I mean with a generic guide is that I have / had some older hosts where I compile openssh from source and replace the default package. When I apply the guide matching the OS (like Centos 7) I don't get a flawless audit but what you mentioned last, about regenerating the rsa key. Now that makes sense as I could not do that step for the host in question without reaching out to external parties connecting to the server first.

@jtesta
Copy link
Owner

jtesta commented Jun 20, 2023

I thought something like:

ssh-audit --Centos7-sshd_config or
ssh-audit --RHEL9-sshd_config
ssh-audit --RHEL9-ssh_config

Ahh, I see what you mean. Sure, that would be pretty straightforward to add, but that would also increase my ongoing maintenance costs. I already feel like I'm always slightly behind, so perhaps this won't get implemented for the time being.

However, if enough people want this feature, I'll certainly reconsider. Feel free to vote on this issue by adding a thumbs-up emoji to this comment.

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

No branches or pull requests

2 participants