You are not logged in.

#1 2017-06-29 17:33:58

gpetruff
Member
Registered: 2016-02-06
Posts: 31

[SOLVED] SSH Service Failed to Start

Hello Everyone !
During my startup last week my notebook was failed to start the sshd.service .
While looking with systemctl I have been able to find the following content:

● sshd.service - OpenSSH Daemon           
   Loaded: loaded (/usr/lib/systemd/system/sshd.service; enabled; vendor preset: disabled)
   Active: failed (Result: exit-code) since Thu 2017-06-29 14:14:12 -03; 1s ago      
  Process: 4461 ExecStart=/usr/bin/sshd -D (code=exited, status=255)                 
 Main PID: 4461 (code=exited, status=255) 

Jun 29 14:14:12 Arch systemd[1]: sshd.service: Failed with result 'exit-code'.  
Jun 29 14:14:12 Arch systemd[1]: sshd.service: Service hold-off time over, scheduling restart.
Jun 29 14:14:12 Arch systemd[1]: Stopped OpenSSH Daemon.                        
Jun 29 14:14:12 Arch systemd[1]: sshd.service: Start request repeated too quickly.
Jun 29 14:14:12 Arch systemd[1]: Failed to start OpenSSH Daemon.                
Jun 29 14:14:12 Arch systemd[1]: sshd.service: Unit entered failed state.       
Jun 29 14:14:12 Arch systemd[1]: sshd.service: Failed with result 'exit-code'. 

I have found on some old related topics that I could disable the sshd.service and enable the sshd.socket to solve the error.
Well this is a solution for the error but the problem is that I use several VM's that connect's to my Arch Host with SSH.
The error produced when I try to connect with the failed sshd.service is :

ssh: connect to host 192.168.236.1 port 22: Connection refused

When I change to the sshd.socket I got this error instead:

ssh_exchange_identification: read: Connection reset by peer

The file located in /etc/ssh/sshd_config have only the port parameter uncomment.

I have edited the socket like required in the ArchWiki with systemctl and added the following parameters :

[Socket]
ListenStream=
ListenStream=22

Unfortunately it did not work.

Any ideas on what can I do?
Thank you !
Best Regards.

Last edited by gpetruff (2017-06-29 22:31:16)

Offline

#2 2017-06-29 21:07:28

seth
Member
Registered: 2012-09-03
Posts: 57,353

Re: [SOLVED] SSH Service Failed to Start

ps aux | grep sshd # empty but for grep?
/usr/bin/sshd # crashes?

Online

#3 2017-06-29 21:29:09

Maniaxx
Member
Registered: 2014-05-14
Posts: 757

Re: [SOLVED] SSH Service Failed to Start

Start the daemon manually with debug output (-d). Debug verbosity can be increased up to -ddd if necessary.

sudo systemctl stop sshd.socket
sudo systemctl stop sshd.service
sudo /usr/bin/sshd -d

Last edited by Maniaxx (2017-06-29 21:31:02)


sys2064

Offline

#4 2017-06-29 22:30:45

gpetruff
Member
Registered: 2016-02-06
Posts: 31

Re: [SOLVED] SSH Service Failed to Start

Thank you for the reply !
I have managed to solve with the -d flag.
By some reason the parameters related to the know hosts were commented and this messed up with the machine.
Thank you once again for the help.
Marking the problem as solved.
Thank you.
Regards

Offline

Board footer

Powered by FluxBB