Hi All,
I have a issue in which SSHD does not restart after reboot. I have a configuration enabled in the system for sshd.
ListenAddress 192.168.0.102
When i saw the logs today I saw that issue seems to be that when sshd starts it does not find the IP.
Code
Oct 13 09:17:09 sharebox systemd[1]: Starting OpenBSD Secure Shell server...
Oct 13 09:17:10 sharebox sshd[739]: error: Bind to port 22 on 192.168.0.102 failed: Cannot assign requested address.
Oct 13 09:17:10 sharebox sshd[739]: fatal: Cannot bind any address.
Oct 13 09:17:10 sharebox systemd[1]: ssh.service: Main process exited, code=exited, status=255/EXCEPTION
Oct 13 09:17:10 sharebox systemd[1]: ssh.service: Failed with result 'exit-code'.
Oct 13 09:17:10 sharebox systemd[1]: Failed to start OpenBSD Secure Shell server.
Oct 13 14:01:03 sharebox systemd[1]: Starting OpenBSD Secure Shell server...
Oct 13 14:01:03 sharebox sshd[9143]: Server listening on 192.168.0.102 port 22.
Oct 13 14:01:03 sharebox systemd[1]: Started OpenBSD Secure Shell server.
But when i check unit file.
Code
[Unit]
Description=OpenBSD Secure Shell server
Documentation=man:sshd(8) man:sshd_config(5)
After=network.target auditd.service
ConditionPathExists=!/etc/ssh/sshd_not_to_be_run
[Service]
EnvironmentFile=-/etc/default/ssh
ExecStartPre=/usr/sbin/sshd -t
ExecStart=/usr/sbin/sshd -D $SSHD_OPTS
ExecReload=/usr/sbin/sshd -t
ExecReload=/bin/kill -HUP $MAINPID
KillMode=process
Restart=on-failure
RestartPreventExitStatus=255
Type=notify
RuntimeDirectory=sshd
RuntimeDirectoryMode=0755
[Install]
WantedBy=multi-user.target
Alias=sshd.service
Alles anzeigen
i can see start after network service.
I do not understand the issue ?
Thanks
Anant