1

I am trying to remote connet my desktop(Ubuntu 20.04.2 LTS) via MacBook. But my request is rejected. So I check my ssh status on Ubuntu.

sightvanish@SVPC:~$ sudo systemctl status ssh
● ssh.service - OpenBSD Secure Shell server
     Loaded: loaded (/lib/systemd/system/ssh.service; disabled; vendor preset: enabled)
     Active: inactive (dead)
       Docs: man:sshd(8)
             man:sshd_config(5)

It shows ssh service is inactive. Then I try to enable it manually.

/etc/init.d/ssh start
Starting ssh (via systemctl): ssh.serviceJob for ssh.service failed because the control process exited with error code.
See "systemctl status ssh.service" and "journalctl -xe" for details.
 failed!

So I do what it says.

sightvanish@SVPC:~$ systemctl status ssh.service
● ssh.service - OpenBSD Secure Shell server
     Loaded: loaded (/lib/systemd/system/ssh.service; disabled; vendor preset: enabled)
     Active: failed (Result: exit-code) since Fri 2021-09-10 11:38:27 CST; 21min ago
       Docs: man:sshd(8)
             man:sshd_config(5)
    Process: 13329 ExecStartPre=/usr/sbin/sshd -t (code=exited, status=1/FAILURE)

9月 10 11:38:27 SVPC systemd[1]: ssh.service: Scheduled restart job, restart counter is at 5. 9月 10 11:38:27 SVPC systemd[1]: Stopped OpenBSD Secure Shell server. 9月 10 11:38:27 SVPC systemd[1]: ssh.service: Start request repeated too quickly. 9月 10 11:38:27 SVPC systemd[1]: ssh.service: Failed with result 'exit-code'. 9月 10 11:38:27 SVPC systemd[1]: Failed to start OpenBSD Secure Shell server.

Then I check it,

sightvanish@SVPC:~$ sshd -t
/etc/ssh/sshd_config line 5: Deprecated option ServerKeyBits
/etc/ssh/sshd_config line 7: Deprecated option KeyRegenerationInterval
/etc/ssh/sshd_config line 16: Deprecated option RhostsAuthentication
/etc/ssh/sshd_config line 17: Deprecated option RhostsRSAAuthentication
/etc/ssh/sshd_config line 18: Deprecated option RSAAuthentication
Unable to load host key: /etc/ssh/ssh_host_key
sshd: no hostkeys available -- exiting.

Well, I generate new key sudo ssh-keygen -A But I still cannot enable ssh service.

sightvanish@SVPC:/etc/ssh$ sudo service ssh start
Job for ssh.service failed because the control process exited with error code.
See "systemctl status ssh.service" and "journalctl -xe" for details.

I am really confused. Please help me!

Archisman Panigrahi
  • 28,338
  • 18
  • 105
  • 212
W Lewis
  • 11
  • 1
  • 2

0 Answers0