Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

On Linux, start the OpenSSH server with sudo systemctl start ssh.service on Ubuntu and Debian, or sudo systemctl start sshd on RHEL, Fedora, CentOS, and Oracle Linux. To start it now and have it start at boot, use sudo systemctl enable --now with the matching service name.

Start the SSH server on your Linux distribution

The command verb is start; the service unit name varies by distribution family.

Distribution family Start now Enable at boot and start now
Ubuntu or Debian with systemd sudo systemctl start ssh.service sudo systemctl enable --now ssh.service
RHEL, Fedora, CentOS, or Oracle Linux with systemd sudo systemctl start sshd sudo systemctl enable --now sshd
Older SysV-based systems /sbin/service sshd start Boot enablement varies by system; the archived Red Hat procedure documents the start command.

Ubuntu’s server guide uses the ssh.service unit, while Oracle Linux documents starting sshd. See Canonical’s Ubuntu OpenSSH server guide and Oracle Linux’s OpenSSH guide. For older SysV systems, see Red Hat’s archived guide.

Check the service name if you are unsure

Some distributions use ssh.service; others use sshd.service. Ask systemd which units are installed:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

systemctl list-unit-files | grep -E '^(ssh|sshd).service'

Use the unit that appears on your system. The service manager accepts the abbreviated forms ssh and sshd as well as the explicit .service suffix.

Install, validate, start, and verify

  1. Install the server package if needed. If the service or sshd command is missing, install the distribution’s OpenSSH server package. The package is typically named openssh-server; Oracle Linux documents openssh and openssh-server.
  2. Validate the configuration. Run sudo sshd -t. The default server configuration file is /etc/ssh/sshd_config; command-line options can override values in that file. The Linux man-pages project’s sshd(8) manual documents the daemon and its options.
  3. Start the appropriate unit. Use the Ubuntu/Debian or RHEL-family command above.
  4. Check service status. Run sudo systemctl status ssh.service or sudo systemctl status sshd.service, matching the installed unit.
  5. Check for a listening socket. Run sudo ss -ltnp | grep ':22'. OpenSSH listens on port 22 by default, unless the server configuration changes the port.
  6. Test from another machine. Connect with ssh user@server, replacing user and server with the account name and host address.

If the server does not start or accept connections

  • The unit is not found: check the unit name with systemctl list-unit-files | grep -E '^(ssh|sshd).service'. If neither appears, install the server package.
  • Configuration validation fails: review /etc/ssh/sshd_config and correct the reported error, then run sudo sshd -t again before starting the service.
  • The service fails during startup: inspect its journal with sudo journalctl -u ssh.service or sudo journalctl -u sshd.service, using the unit name installed on your system.
  • The service is active but remote connections fail: verify that it is listening on the expected port and check the host’s firewall policy. If Port is set in the server configuration, test that port rather than assuming the default.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

When to run sshd directly

sudo /usr/sbin/sshd runs the daemon directly. This can be useful for diagnostics or custom supervision, but normal server operation should use the distribution’s service manager so startup remains integrated with service supervision and boot configuration. OpenSSH describes sshd as providing secure encrypted communications between two untrusted hosts over an insecure network; the OpenBSD sshd(8) manual and sshd_config(5) manual cover the daemon and its configuration.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.