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

SSH daemon is running - Exception Found #1487

Open
maxdd opened this issue Apr 18, 2024 · 3 comments
Open

SSH daemon is running - Exception Found #1487

maxdd opened this issue Apr 18, 2024 · 3 comments
Assignees
Labels
good-first-issue This may be a great opportunity to get started with contributing to an open source project! help-wanted Help for this issue is welcome. Great for those who like to chime in and contribute! up-for-grabs waiting-for-pull-request Waiting for the creation of a pull request

Comments

@maxdd
Copy link

maxdd commented Apr 18, 2024

Hello, most likely related to the fact that i have set

sudo chmod 600 /etc/ssh/sshd_config

but when i run lynis as normal user i get

[+] SSH Support
------------------------------------
  - Checking running SSH daemon                               [ FOUND ]
    - Searching SSH configuration                             [ NOT FOUND ]

=================================================================

  Exception found!

  Function/test:  [SSH-7404:1]
  Message:        SSH daemon is running, but no readable configuration file found

  Help improving the Lynis community with your feedback!

  Steps:
  - Ensure you are running the latest version (./lynis update check)
  - If so, create a GitHub issue at https://github.com/CISOfy/lynis
  - Include relevant parts of the log file or configuration file

  Thanks!

=================================================================

Regards,

@mboelen
Copy link
Member

mboelen commented May 17, 2024

Thanks for reporting. For the details, please see the lynis.log file (lynis show details SSH-7404).

What does it show?

@mboelen mboelen self-assigned this May 17, 2024
@maxdd
Copy link
Author

maxdd commented May 27, 2024

2024-05-27 10:27:51 Performing test ID SSH-7404 (Check SSH daemon file location)
2024-05-27 10:27:51 Test: searching for sshd_config file
2024-05-27 10:27:51 Result: /etc/ssh/sshd_config exists
2024-05-27 10:27:51 Test: check if we can access /etc/ssh/sshd_config (escaped: /etc/ssh/sshd_config)
2024-05-27 10:27:51 Result: file is not owned by current user ID (1000), but UID 0
2024-05-27 10:27:51 Result: can not read /etc/ssh/sshd_config file (no permission)
2024-05-27 10:27:51 Result: No sshd configuration found
2024-05-27 10:27:51 Exception: test has an exceptional event (SSH-7404:1) with text SSH daemon is running, but no readable configuration file found
2024-05-27 10:27:56 ====

@mboelen
Copy link
Member

mboelen commented May 27, 2024

This is then to be expected, as you tightened things down. One option that I see is to replace the message "not found" with "not readable by user" or something, and to prevent the exception. Will give it a thought and see what we can change.

Edit: Adding some tags to allow others to chime in.

@mboelen mboelen added up-for-grabs help-wanted Help for this issue is welcome. Great for those who like to chime in and contribute! good-first-issue This may be a great opportunity to get started with contributing to an open source project! waiting-for-pull-request Waiting for the creation of a pull request and removed information-needed labels May 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good-first-issue This may be a great opportunity to get started with contributing to an open source project! help-wanted Help for this issue is welcome. Great for those who like to chime in and contribute! up-for-grabs waiting-for-pull-request Waiting for the creation of a pull request
Projects
None yet
Development

No branches or pull requests

2 participants