sshd error: Error loading host key “/etc/ssh/ssh_host_ed25519_key”: invalid format [closed]
Clash Royale CLAN TAG#URR8PPP
up vote
0
down vote
favorite
I have a new installation of Arch Linux running on a server. I'm getting this error when I log in via ssh:
sshd error: Error loading host key "/etc/ssh/ssh_host_ed25519_key": invalid format
The only non-default sshd_config
options are these:
grep '^[^#]' /etc/ssh/sshd_config
HostKey /etc/ssh/ssh_host_ed25519_key
PermitRootLogin no
AuthorizedKeysFile .ssh/authorized_keys
PasswordAuthentication no
ChallengeResponseAuthentication no
UsePAM yes
PrintMotd no # pam does that
Of those, some are default Arch Linux changes. My only changes to sshd_config are:
HostKey /etc/ssh/ssh_host_ed25519_key
PermitRootLogin no
PasswordAuthentication no
I am actually able to login with my personal ed25519 key. I am not getting ssh login errors, but I would like to understand why I'm getting the error message in journalctl.
The file /etc/ssh/ssh_host_ed25519_key
is present:
ls -la /etc/ssh/ssh_host_ed25519_key
-rw------- 1 root root 419 Nov 29 18:36 /etc/ssh/ssh_host_ed25519_key
The file's contents look correct. They are:
-----BEGIN OPENSSH PRIVATE KEY-----
...key material...
-----END OPENSSH PRIVATE KEY-----
Where could the error message be coming from? It happens on every ssh login.
linux ssh sshd
closed as off-topic by Isaac, G-Man, Jeff Schaller, John WH Smith, RalfFriedl Dec 2 at 0:24
This question appears to be off-topic. The users who voted to close gave this specific reason:
- "Questions describing a problem that can't be reproduced and seemingly went away on its own (or went away when a typo was fixed) are off-topic as they are unlikely to help future readers." – Isaac, G-Man, Jeff Schaller, John WH Smith, RalfFriedl
|
show 5 more comments
up vote
0
down vote
favorite
I have a new installation of Arch Linux running on a server. I'm getting this error when I log in via ssh:
sshd error: Error loading host key "/etc/ssh/ssh_host_ed25519_key": invalid format
The only non-default sshd_config
options are these:
grep '^[^#]' /etc/ssh/sshd_config
HostKey /etc/ssh/ssh_host_ed25519_key
PermitRootLogin no
AuthorizedKeysFile .ssh/authorized_keys
PasswordAuthentication no
ChallengeResponseAuthentication no
UsePAM yes
PrintMotd no # pam does that
Of those, some are default Arch Linux changes. My only changes to sshd_config are:
HostKey /etc/ssh/ssh_host_ed25519_key
PermitRootLogin no
PasswordAuthentication no
I am actually able to login with my personal ed25519 key. I am not getting ssh login errors, but I would like to understand why I'm getting the error message in journalctl.
The file /etc/ssh/ssh_host_ed25519_key
is present:
ls -la /etc/ssh/ssh_host_ed25519_key
-rw------- 1 root root 419 Nov 29 18:36 /etc/ssh/ssh_host_ed25519_key
The file's contents look correct. They are:
-----BEGIN OPENSSH PRIVATE KEY-----
...key material...
-----END OPENSSH PRIVATE KEY-----
Where could the error message be coming from? It happens on every ssh login.
linux ssh sshd
closed as off-topic by Isaac, G-Man, Jeff Schaller, John WH Smith, RalfFriedl Dec 2 at 0:24
This question appears to be off-topic. The users who voted to close gave this specific reason:
- "Questions describing a problem that can't be reproduced and seemingly went away on its own (or went away when a typo was fixed) are off-topic as they are unlikely to help future readers." – Isaac, G-Man, Jeff Schaller, John WH Smith, RalfFriedl
I found this blog post, but I am reluctant to do those steps: until I understand the problem better: sharadchhetri.com/2018/10/08/sshd-error-could-not-load-host-key
– MountainX
Nov 30 at 2:09
The problem might be with the key. You could test that the private key generates a correct public key withssh-keygen -y -f ssh_host_ed25519_key
. If it does the problem is not with the key.
– Isaac
Nov 30 at 3:40
@Isaac - thanks for the troubleshooting idea. The correct public key was re-generated without any errors. It matches exactly with the prior public key.
– MountainX
Nov 30 at 4:01
Have you tested the configuration file withsshd -t
or even th emuch more verbosesshd -T
. If there is no error reported on that test I can not think of anything else to check.
– Isaac
Nov 30 at 6:09
1
@Isaac I am using port 22 and sshd is not being blocked. I ended up deleting /etc/ssh/ssh_host_ed25519_key* and letting the keys be regenerated. That fixed the issue even though I could not find anything wrong with the prior keys.
– MountainX
Dec 1 at 3:07
|
show 5 more comments
up vote
0
down vote
favorite
up vote
0
down vote
favorite
I have a new installation of Arch Linux running on a server. I'm getting this error when I log in via ssh:
sshd error: Error loading host key "/etc/ssh/ssh_host_ed25519_key": invalid format
The only non-default sshd_config
options are these:
grep '^[^#]' /etc/ssh/sshd_config
HostKey /etc/ssh/ssh_host_ed25519_key
PermitRootLogin no
AuthorizedKeysFile .ssh/authorized_keys
PasswordAuthentication no
ChallengeResponseAuthentication no
UsePAM yes
PrintMotd no # pam does that
Of those, some are default Arch Linux changes. My only changes to sshd_config are:
HostKey /etc/ssh/ssh_host_ed25519_key
PermitRootLogin no
PasswordAuthentication no
I am actually able to login with my personal ed25519 key. I am not getting ssh login errors, but I would like to understand why I'm getting the error message in journalctl.
The file /etc/ssh/ssh_host_ed25519_key
is present:
ls -la /etc/ssh/ssh_host_ed25519_key
-rw------- 1 root root 419 Nov 29 18:36 /etc/ssh/ssh_host_ed25519_key
The file's contents look correct. They are:
-----BEGIN OPENSSH PRIVATE KEY-----
...key material...
-----END OPENSSH PRIVATE KEY-----
Where could the error message be coming from? It happens on every ssh login.
linux ssh sshd
I have a new installation of Arch Linux running on a server. I'm getting this error when I log in via ssh:
sshd error: Error loading host key "/etc/ssh/ssh_host_ed25519_key": invalid format
The only non-default sshd_config
options are these:
grep '^[^#]' /etc/ssh/sshd_config
HostKey /etc/ssh/ssh_host_ed25519_key
PermitRootLogin no
AuthorizedKeysFile .ssh/authorized_keys
PasswordAuthentication no
ChallengeResponseAuthentication no
UsePAM yes
PrintMotd no # pam does that
Of those, some are default Arch Linux changes. My only changes to sshd_config are:
HostKey /etc/ssh/ssh_host_ed25519_key
PermitRootLogin no
PasswordAuthentication no
I am actually able to login with my personal ed25519 key. I am not getting ssh login errors, but I would like to understand why I'm getting the error message in journalctl.
The file /etc/ssh/ssh_host_ed25519_key
is present:
ls -la /etc/ssh/ssh_host_ed25519_key
-rw------- 1 root root 419 Nov 29 18:36 /etc/ssh/ssh_host_ed25519_key
The file's contents look correct. They are:
-----BEGIN OPENSSH PRIVATE KEY-----
...key material...
-----END OPENSSH PRIVATE KEY-----
Where could the error message be coming from? It happens on every ssh login.
linux ssh sshd
linux ssh sshd
asked Nov 30 at 2:06
MountainX
4,9162472130
4,9162472130
closed as off-topic by Isaac, G-Man, Jeff Schaller, John WH Smith, RalfFriedl Dec 2 at 0:24
This question appears to be off-topic. The users who voted to close gave this specific reason:
- "Questions describing a problem that can't be reproduced and seemingly went away on its own (or went away when a typo was fixed) are off-topic as they are unlikely to help future readers." – Isaac, G-Man, Jeff Schaller, John WH Smith, RalfFriedl
closed as off-topic by Isaac, G-Man, Jeff Schaller, John WH Smith, RalfFriedl Dec 2 at 0:24
This question appears to be off-topic. The users who voted to close gave this specific reason:
- "Questions describing a problem that can't be reproduced and seemingly went away on its own (or went away when a typo was fixed) are off-topic as they are unlikely to help future readers." – Isaac, G-Man, Jeff Schaller, John WH Smith, RalfFriedl
I found this blog post, but I am reluctant to do those steps: until I understand the problem better: sharadchhetri.com/2018/10/08/sshd-error-could-not-load-host-key
– MountainX
Nov 30 at 2:09
The problem might be with the key. You could test that the private key generates a correct public key withssh-keygen -y -f ssh_host_ed25519_key
. If it does the problem is not with the key.
– Isaac
Nov 30 at 3:40
@Isaac - thanks for the troubleshooting idea. The correct public key was re-generated without any errors. It matches exactly with the prior public key.
– MountainX
Nov 30 at 4:01
Have you tested the configuration file withsshd -t
or even th emuch more verbosesshd -T
. If there is no error reported on that test I can not think of anything else to check.
– Isaac
Nov 30 at 6:09
1
@Isaac I am using port 22 and sshd is not being blocked. I ended up deleting /etc/ssh/ssh_host_ed25519_key* and letting the keys be regenerated. That fixed the issue even though I could not find anything wrong with the prior keys.
– MountainX
Dec 1 at 3:07
|
show 5 more comments
I found this blog post, but I am reluctant to do those steps: until I understand the problem better: sharadchhetri.com/2018/10/08/sshd-error-could-not-load-host-key
– MountainX
Nov 30 at 2:09
The problem might be with the key. You could test that the private key generates a correct public key withssh-keygen -y -f ssh_host_ed25519_key
. If it does the problem is not with the key.
– Isaac
Nov 30 at 3:40
@Isaac - thanks for the troubleshooting idea. The correct public key was re-generated without any errors. It matches exactly with the prior public key.
– MountainX
Nov 30 at 4:01
Have you tested the configuration file withsshd -t
or even th emuch more verbosesshd -T
. If there is no error reported on that test I can not think of anything else to check.
– Isaac
Nov 30 at 6:09
1
@Isaac I am using port 22 and sshd is not being blocked. I ended up deleting /etc/ssh/ssh_host_ed25519_key* and letting the keys be regenerated. That fixed the issue even though I could not find anything wrong with the prior keys.
– MountainX
Dec 1 at 3:07
I found this blog post, but I am reluctant to do those steps: until I understand the problem better: sharadchhetri.com/2018/10/08/sshd-error-could-not-load-host-key
– MountainX
Nov 30 at 2:09
I found this blog post, but I am reluctant to do those steps: until I understand the problem better: sharadchhetri.com/2018/10/08/sshd-error-could-not-load-host-key
– MountainX
Nov 30 at 2:09
The problem might be with the key. You could test that the private key generates a correct public key with
ssh-keygen -y -f ssh_host_ed25519_key
. If it does the problem is not with the key.– Isaac
Nov 30 at 3:40
The problem might be with the key. You could test that the private key generates a correct public key with
ssh-keygen -y -f ssh_host_ed25519_key
. If it does the problem is not with the key.– Isaac
Nov 30 at 3:40
@Isaac - thanks for the troubleshooting idea. The correct public key was re-generated without any errors. It matches exactly with the prior public key.
– MountainX
Nov 30 at 4:01
@Isaac - thanks for the troubleshooting idea. The correct public key was re-generated without any errors. It matches exactly with the prior public key.
– MountainX
Nov 30 at 4:01
Have you tested the configuration file with
sshd -t
or even th emuch more verbose sshd -T
. If there is no error reported on that test I can not think of anything else to check.– Isaac
Nov 30 at 6:09
Have you tested the configuration file with
sshd -t
or even th emuch more verbose sshd -T
. If there is no error reported on that test I can not think of anything else to check.– Isaac
Nov 30 at 6:09
1
1
@Isaac I am using port 22 and sshd is not being blocked. I ended up deleting /etc/ssh/ssh_host_ed25519_key* and letting the keys be regenerated. That fixed the issue even though I could not find anything wrong with the prior keys.
– MountainX
Dec 1 at 3:07
@Isaac I am using port 22 and sshd is not being blocked. I ended up deleting /etc/ssh/ssh_host_ed25519_key* and letting the keys be regenerated. That fixed the issue even though I could not find anything wrong with the prior keys.
– MountainX
Dec 1 at 3:07
|
show 5 more comments
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
I found this blog post, but I am reluctant to do those steps: until I understand the problem better: sharadchhetri.com/2018/10/08/sshd-error-could-not-load-host-key
– MountainX
Nov 30 at 2:09
The problem might be with the key. You could test that the private key generates a correct public key with
ssh-keygen -y -f ssh_host_ed25519_key
. If it does the problem is not with the key.– Isaac
Nov 30 at 3:40
@Isaac - thanks for the troubleshooting idea. The correct public key was re-generated without any errors. It matches exactly with the prior public key.
– MountainX
Nov 30 at 4:01
Have you tested the configuration file with
sshd -t
or even th emuch more verbosesshd -T
. If there is no error reported on that test I can not think of anything else to check.– Isaac
Nov 30 at 6:09
1
@Isaac I am using port 22 and sshd is not being blocked. I ended up deleting /etc/ssh/ssh_host_ed25519_key* and letting the keys be regenerated. That fixed the issue even though I could not find anything wrong with the prior keys.
– MountainX
Dec 1 at 3:07