-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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-7402 fails to generate a copy of sshd_config #1184
Comments
Thanks for reporting. Do you know why it shows that there are no hostkeys available on your system? It SSH properly configured and running? |
There certainly are keys under openat(AT_FDCWD, "/etc/ssh/ssh_host_rsa_key", O_RDONLY) = -1 EACCES (Permission denied)
openat(AT_FDCWD, "/etc/ssh/ssh_host_rsa_key", O_RDONLY) = -1 EACCES (Permission denied)
openat(AT_FDCWD, "/etc/ssh/ssh_host_rsa_key.pub", O_RDONLY) = 3
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=391, ...}, AT_EMPTY_PATH) = 0
read(3, "ssh-rsa AAAAB3NzaC1yc2EAAAADAQAB"..., 4096) = 391
close(3) = 0
openat(AT_FDCWD, "/etc/ssh/ssh_host_ecdsa_key", O_RDONLY) = -1 EACCES (Permission denied)
openat(AT_FDCWD, "/etc/ssh/ssh_host_ecdsa_key", O_RDONLY) = -1 EACCES (Permission denied)
openat(AT_FDCWD, "/etc/ssh/ssh_host_ecdsa_key.pub", O_RDONLY) = 3
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=171, ...}, AT_EMPTY_PATH) = 0
read(3, "ecdsa-sha2-nistp256 AAAAE2VjZHNh"..., 4096) = 171
close(3) = 0
openat(AT_FDCWD, "/etc/ssh/ssh_host_ed25519_key", O_RDONLY) = -1 EACCES (Permission denied)
openat(AT_FDCWD, "/etc/ssh/ssh_host_ed25519_key", O_RDONLY) = -1 EACCES (Permission denied)
openat(AT_FDCWD, "/etc/ssh/ssh_host_ed25519_key.pub", O_RDONLY) = 3
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=91, ...}, AT_EMPTY_PATH) = 0
read(3, "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5"..., 4096) = 91
close(3) = 0
write(2, "sshd: no hostkeys available -- e"..., 41sshd: no hostkeys available -- exiting.
) = 41
exit_group(1) = ?
+++ exited with 1 +++ and ➜ ls -l /etc/ssh
total 600
-rw-r--r-- 1 root root 570321 Apr 19 12:32 moduli
-rw-r--r-- 1 root root 1531 Apr 19 12:32 ssh_config
-rw-r--r-- 1 root root 3140 Apr 19 12:32 sshd_config
-rw------- 1 root root 1373 Apr 5 2019 ssh_host_dsa_key
-rw-r--r-- 1 root root 599 Apr 5 2019 ssh_host_dsa_key.pub
-rw------- 1 root root 505 Apr 5 2019 ssh_host_ecdsa_key
-rw-r--r-- 1 root root 171 Apr 5 2019 ssh_host_ecdsa_key.pub
-rw------- 1 root root 399 Apr 5 2019 ssh_host_ed25519_key
-rw-r--r-- 1 root root 91 Apr 5 2019 ssh_host_ed25519_key.pub
-rw------- 1 root root 1811 Apr 5 2019 ssh_host_rsa_key
-rw-r--r-- 1 root root 391 Apr 5 2019 ssh_host_rsa_key.pub I'm wondering if recent versions of openssh now Also of note, running that command as root yields config data, e.g. ➜ sudo sshd -T -C user=doesnotexist,host=none,addr=none | wc -l
86 If its any help, i think this is when the change was introduced to v7.3 from my cursory checking did not have the |
Although the What do you get to see as output when you run |
same, ➜ sshd -T
sshd: no hostkeys available -- exiting. |
Can you test the following:
|
as a non privileged user i get: vinceoa@dell: /home/vinceoa
➜ sshd -T
sshd: no hostkeys available -- exiting.
vinceoa@dell: /home/vinceoa
➜ ssh-keygen -A
vinceoa@dell: /home/vinceoa
➜ sshd -T
sshd: no hostkeys available -- exiting. |
Describe the bug
executing
sshd -T -C user=doesnotexist,host=none,addr=none
returns non zero and no config, causing all of SSH-7408 (option checking) to returnNOT FOUND
Version
Expected behavior
execution of
sshd -T -C ...
should yield a configuration, which then permits SSH-7408 to check the optionsOutput
From the console
From the
lynis.log
Additional context
Executing
sshd -T -C ...
manually on the command line revealsThe text was updated successfully, but these errors were encountered: