So I installed openSSH-server on my ubuntu 16.10 with sudo apt-get install openssh-server and it worked BUT when I type sudo service ssh start it says

Job for ssh.service failed because the control process exited with error code. see systemctl status ssh.service and journalctl -xe for details.

I type systemctl status ssh.service and it says the following

`"ssh.service - OpenBSD Secure Shell Server
Loaded: loaded (/lib/systemd/system/ssh.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code)  since 2017-01-04 15:56:11 CET; 19s ago
Process: 2701 ExecStart=/usr/sbin/sshd -D $SSHD_OPTS (code=exited, status=255)
Main PID: 2701 (code=exited, status=255)

Jan 04 15:56:11 PM-server systemd[1]: Starting OpenBSD Secure Shell server...
Jan 04 15:56:11 PM-server systemd[1]: ssh.service: Main process exited, code=exited, status=255/n/a
Jan 04 15:56:11 PM-server systemd[1]: Failed to start OpenBSD Secure Shell server.
Jan 04 15:56:11 PM-server systemd[1]: ssh.service: Unit entered failed state.
Jan 04 15:56:11 PM-server systemd[1]: ssh. service: Failed with result "exit-code""`

Any Ideas on how to fix this? I googled a couple of hours but didn't find anything usefull. thx on beforehand.

  • 3
    run sudo /usr/sbin/sshd -T to see what is wrong with the service and why does it fail. – Jakuje Jan 4 '17 at 15:24
  • Unless you edited the config files, file a but report - bugs.launchpad.net/ubuntu/+source/openssh/+bug/1549473 – Panther Jan 4 '17 at 15:54
  • to enable creating a SSH connection from your machine to another you do not see to install the SSH server just the client ... by installing SSH server you are enabling the world to attempt to login to your machine ... If server is needed make certain you have nailed the security else remove the server and just have the client – Scott Stensland Jan 4 '17 at 16:37
  • Maybe I should have mentioned that I'm trying to setup a SFTP-server. So I believe that I need the ssh-server or am I wrong? I'm little of a noob so what exactly am I looking for when I type sudo /usr/sbin/sshd -T, it looks like it shows the ssh.config file to me but I don't see the problem. – KV-2 Jan 5 '17 at 13:49

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.