sshd启动报错解决:sshd re-exec requires execution with an absolute path 2025-03-17 linux 暂无评论 215 次阅读 ``` # sudo /usr/sbin/sshd ``` 如下报错: ``` Could not load host key: /etc/ssh/ssh_host_rsa_key Could not load host key: /etc/ssh/ssh_host_ecdsa_key Could not load host key: /etc/ssh/ssh_host_ed25519_key Missing privilege separation directory: /run/sshd ``` 解决: ``` # sudo ssh-keygen -t rsa -f /etc/ssh/ssh_host_rsa_key # sudo ssh-keygen -t ecdsa -f /etc/ssh/ssh_host_ecdsa_key # sudo ssh-keygen -t ed25519 -f /etc/ssh/ssh_host_ed25519_key ``` 转载https://blog.csdn.net/u010164190/article/details/106126921/ 在开启SSHD服务时报错 ``` sshd re-exec requires execution with an absolute path ``` 用绝对路径启动,也报错如下: ``` Could not load host key: /etc/ssh/ssh_host_key Could not load host key: /etc/ssh/ssh_host_rsa_key Could not load host key: /etc/ssh/ssh_host_dsa_key Disabling protocol version 1. Could not load host key Disabling protocol version 2. Could not load host key sshd: no hostkeys available — exiting ``` 解决过程: ``` #ssh-keygen -t dsa -f /etc/ssh/ssh_host_dsa_key #ssh-keygen -t rsa -f /etc/ssh/ssh_host_rsa_key #/usr/sbin/sshd ``` 转载https://blog.csdn.net/cnham/article/details/2899252 标签: ssh 本作品采用 知识共享署名-相同方式共享 4.0 国际许可协议 进行许可。