Unable to Login via SSH: sshd.service Failed to Start (Failed at step EXEC spawning /usr/local/sbin/sshd: No such file or directory)
Issue
-
Server cannot be accessed via SSH and only accessible through virtual machine's console.
-
Connection to the server refuses with Connection refused error.
ssh: connect to host xx.x.xx.xxx port 22: Connection refused -
sshd service failed to start with following errors.
systemd[x]: sshd.service: Failed to execute command: No such file or directory systemd[x]: sshd.service: Failed at step EXEC spawning /usr/local/sbin/sshd: No such file or directory systemd[x]: sshd.service: Main process exited, code=exited, status=203/EXEC systemd[x]: sshd.service: Failed with result 'exit-code'. systemd[x]: Failed to start OpenSSH server daemon.
Environment
- Red Hat Enterprise Linux (All versions)
- openssh
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.