sudo systemctl status ssh -inactive (dead)

hacktheworld

Active Member
Joined
Mar 28, 2023
Messages
155
Reaction score
59
Credits
1,180
$ sudo systemctl status ssh
○ ssh.service - OpenBSD Secure Shell server
Loaded: loaded (/usr/lib/systemd/system/ssh.service; disabled; preset: >
Active: inactive (dead)
Docs: man:sshd(8)
man:sshd_config(5)
 


I tried to activate ssh.service using:
sudo systemctl restart ssh
is the output below correct?

systemctl status ssh.service
● ssh.service - OpenBSD Secure Shell server
Loaded: loaded (/usr/lib/systemd/system/ssh.service; disabled; preset: >
Active: active (running) since Wed 2024-10-02 01:25:16 CEST; 1min 0s ago
Invocation: f2fdbf895af44e5198ea87fdff0d913e
Docs: man:sshd(8)
man:sshd_config(5)
Process: 11433 ExecStartPre=/usr/sbin/sshd -t (code=exited, status=0/SUC>
Main PID: 11435 (sshd)
Tasks: 1 (limit: 6929)
Memory: 1.4M (peak: 1.9M)
CPU: 57ms
CGroup: /system.slice/ssh.service
└─11435 "sshd: /usr/sbin/sshd -D [listener] 0 of 10-100 st
 
sudo systemctl restart ssh

That will start it, but it won't be started on the next reboot.

sudo systemctl enable sshd

will fix that.
Also in some distro's ssh is blocked by the firewall.
 


Top