I have been looking around and couldn't find a solution to the issue I am having. I am running Ubuntu 16.04 LTS
, and I followed instructions on the Ubuntu page for changing the SSH port to 2222
by updating the sshd_config
file.
# What ports, IPs and protocols we listen for
Port 2222
When I execute the command sudo systemctl restart sshd.service
, however, I only get the following error:
Job for ssh.service failed because the control process exited with error code. See "systemctl status ssh.service" and "journalctl -xe" for details.
I then executed the command systemctl status ssh.service
and got
● ssh.service - OpenBSD Secure Shell server
Loaded: loaded (/lib/systemd/system/ssh.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Wed 2016-09-07 23:24:04 EDT; 1min 28s ago
Process: 16813 ExecStart=/usr/sbin/sshd -D $SSHD_OPTS (code=exited, status=255)
Main PID: 16813 (code=exited, status=255)
Sep 07 23:24:04 sys-0 systemd[1]: Starting OpenBSD Secure Shell server...
Sep 07 23:24:04 sys-0 systemd[1]: ssh.service: Main process exited, code=exited, status=255/n/a
Sep 07 23:24:04 sys-0 systemd[1]: Failed to start OpenBSD Secure Shell server.
Sep 07 23:24:04 sys-0 systemd[1]: ssh.service: Unit entered failed state.
Sep 07 23:24:04 sys-0 systemd[1]: ssh.service: Failed with result 'exit-code'.
What does the error mean, and how can I address it?
sshd_config
. What if you put back the original one?sudo sshd -vvvf /etc/ssh/sshd_config
should give you clue as to what is wrong2222
worked for me today doing the exact same thing I did last night. Very odd.unknown option -- v
.