You are not logged in.

#1 2023-06-04 17:04:53

PetchPotch
Member
Registered: 2023-05-27
Posts: 7

Having Issues With Host Keys on SSH [Resolved]

Despite Generating the Keys in

 /etc/ssh/ 

SSHD still refuses to acknowledge them and Exits and Prints the same Thing Everytime.

$ sshd -t
Unable to load host key: /etc/ssh/ssh_host_rsa_key

and here's the directory

$ ls /etc/ssh -l
total 596
-rw-r--r-- 1 root root 573991 Mar 16 21:51 moduli
-rw-r--r-- 1 root root   1531 Mar 16 21:51 ssh_config
-rw-r--r-- 1 root root   3102 Jun  4 22:26 sshd_config
-rw------- 1 root root    505 Jun  4 22:24 ssh_host_ecdsa_key
-rw-r--r-- 1 root root    176 Jun  4 22:24 ssh_host_ecdsa_key.pub
-rw------- 1 root root    411 Jun  4 22:24 ssh_host_ed25519_key
-rw-r--r-- 1 root root     96 Jun  4 22:24 ssh_host_ed25519_key.pub
-rw------- 1 root root   2602 Jun  4 22:24 ssh_host_rsa_key
-rw-r--r-- 1 root root    568 Jun  4 22:24 ssh_host_rsa_key.pub

I am genuinely lost on what I am doing Wrong.

Last edited by PetchPotch (2023-06-05 16:05:35)

Offline

#2 2023-06-04 17:18:59

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 30,330
Website

Re: Having Issues With Host Keys on SSH [Resolved]

You're trying to run sshd as a regular user, but the key is only readable as root ... which is just as well, as sshd wouldn't be able to bind low numbered ports as a regular user.

Why aren't you using the sshd.service?

Last edited by Trilby (2023-06-04 17:19:16)


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

#3 2023-06-04 17:36:00

PetchPotch
Member
Registered: 2023-05-27
Posts: 7

Re: Having Issues With Host Keys on SSH [Resolved]

You're trying to run sshd as a regular user, but the key is only readable as root

God, I didn't Realize, My Bad. It works now, Thanks for Correcting my Silly Mistake.

Last edited by PetchPotch (2023-06-04 17:36:16)

Offline

#4 2023-06-04 20:26:17

seth
Member
Registered: 2012-09-03
Posts: 60,792

Re: Having Issues With Host Keys on SSH [Resolved]

Please always remember to mark resolved threads by editing your initial posts subject - so others will know that there's no task left, but maybe a solution to find.
Thanks.

Offline

Board footer

Powered by FluxBB