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

sshd: no hostkeys available on remote #2

Open
thomarse-ef opened this issue Jun 20, 2024 · 3 comments
Open

sshd: no hostkeys available on remote #2

thomarse-ef opened this issue Jun 20, 2024 · 3 comments

Comments

@thomarse-ef
Copy link

thomarse-ef commented Jun 20, 2024

Hey. I'm getting an error when setting up remote. The command to test sshd setup produces an error:

pi@raspberrypi:~ $ sshd -t && echo 'looks good' || echo 'sshd config is invalid'
sshd: no hostkeys available -- exiting.
sshd config is invalid

I have added the ssh key to /home/pitunnel/.ssh/authorized_keys and have modified the permissions per the instructions. Is there anything else I need to so? /home/pitunnel/.ssh/authorized_keys looks like this:

ssh-ed25519 <long_string_of_characters_and_numbers> pi@raspberrypi

Is this correct?

@igor47
Copy link
Owner

igor47 commented Jun 20, 2024

where did you get that command to "test sshd" ? i think you want to just test "ssh" -- the client, not the daemon.

@thomarse-ef
Copy link
Author

I meant this line from the readme sshd -t && echo 'looks good' || echo 'sshd config is invalid'

@igor47
Copy link
Owner

igor47 commented Jun 21, 2024

ah i see the confusion. this is meant to be run on the remote machine. that's the machine you're keeping the persistent tunnel to. seems like you're running the command on the pi itself. moreover, you're invoking that command as a regular user, which means you don't have access to the machine's host keys (those are root-readable only).

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

No branches or pull requests

2 participants