17 lines
646 B
Markdown
17 lines
646 B
Markdown
- sshd启动报错 #linux
|
|
- ```bash
|
|
$ wsl.exe--distribution Arch --user root --exec sh -c "which sshd"
|
|
/usr/sbin/sshd
|
|
$ wsl.exe--distribution Arch --user root --exec /usr/sbin/sshd -dD
|
|
debug1: sshd version OpenSSH_9.3 OpenSSL 3.0.8 7 Feb 2023
|
|
debug1: Unable to load host key: /etc/ssh/ssh_host_rsa_key
|
|
debug1: Unable to load host key: /etc/ssh/ssh_host_ecdsa_key
|
|
debug1: Unable to load host key: /etc/ssh/ssh_host_ed25519_key
|
|
sshd: no hostkeys available -- exiting.
|
|
```
|
|
- 解决
|
|
- ```zsh
|
|
ssh-keygen -A
|
|
ssh-keygen -t dsa -f /etc/ssh/ssh_host_dsa_key
|
|
ssh-keygen -t rsa -f /etc/ssh/ssh_host_rsa_key
|
|
``` |