SSH server won't start, exit code 255
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
openssh (Ubuntu) |
Expired
|
Undecided
|
Unassigned |
Bug Description
I keep trying to set up external SSH access using openssh server on my 18.04 system and it throws back this error
sudo service ssh status
● ssh.service - OpenBSD Secure Shell server
Loaded: loaded (/lib/systemd/
Active: failed (Result: exit-code) since Sat 2018-07-07 09:33:19 CDT; 12min ago
Process: 3243 ExecStartPre=
Jul 07 09:33:19 warehouse systemd[1]: ssh.service: Service hold-off time over, scheduling restart.
Jul 07 09:33:19 warehouse systemd[1]: ssh.service: Scheduled restart job, restart counter is at 5.
Jul 07 09:33:19 warehouse systemd[1]: Stopped OpenBSD Secure Shell server.
Jul 07 09:33:19 warehouse systemd[1]: ssh.service: Start request repeated too quickly.
Jul 07 09:33:19 warehouse systemd[1]: ssh.service: Failed with result 'exit-code'.
Jul 07 09:33:19 warehouse systemd[1]: Failed to start OpenBSD Secure Shell server.
I was in the process of uninstalling the openssh-server and ssh packages and was prompted to start a bug report. If it's in error, just let me know. My ssh config file is all default except for passwordauthent
ProblemType: Package
DistroRelease: Ubuntu 18.04
Package: openssh-server 1:7.6p1-4
ProcVersionSign
Uname: Linux 4.15.0-23-generic x86_64
NonfreeKernelMo
ApportVersion: 2.20.9-0ubuntu7.2
AptOrdering:
openssh-
ssh:amd64: Install
NULL: ConfigurePending
Architecture: amd64
Date: Sat Jul 7 09:48:11 2018
ErrorMessage: installed openssh-server package post-installation script subprocess returned error exit status 1
InstallationDate: Installed on 2018-07-07 (0 days ago)
InstallationMedia: Ubuntu 18.04 LTS "Bionic Beaver" - Release amd64 (20180426)
Python3Details: /usr/bin/python3.6, Python 3.6.5, python3-minimal, 3.6.5-3
PythonDetails: N/A
RelatedPackageV
dpkg 1.19.0.5ubuntu2
apt 1.6.2
SSHDConfig:
Error: command ['/usr/sbin/sshd', '-T'] failed with exit code 255: /etc/ssh/
/etc/ssh/
SourcePackage: openssh
Title: package openssh-server 1:7.6p1-4 failed to install/upgrade: installed openssh-server package post-installation script subprocess returned error exit status 1
UpgradeStatus: No upgrade log present (probably fresh install)
tags: | removed: need-duplicate-check |
It looks like the ssh server configuration file has become corrupted - notice the error message:
Error: command ['/usr/sbin/sshd', '-T'] failed with exit code 255: /etc/ssh/ sshd_config: line 1: Bad configuration option: \342\200\ 213\342\ 200\213 sshd_config: terminating, 1 bad configuration options
/etc/ssh/
Have you edit this file? Can you please make sure it is valid.