Restarting The SSH Service

After using certain SSH commands you may wish or need to restart the SSH daemon (sshd) to make your changes work. Here's how to do it depending on the linux distribution you are using.


For CentOS, Fedora, Redhat, RHEL:
# /etc/init.d.sshd restart


# service sshd restart

If you are using CentOS/Fedora/RHEL Linux with systemd, enter:

$ sudo systemctl restart sshd


For Debian, Ubuntu Linux:

# /etc/init.d.ssh restart


# service ssh restart


$ sudo service ssh restart


If you are using Debian/Ubuntu/Mint Linux with systemd, enter:


$ sudo systemctl restart ssh

  • 2 Users Found This Useful
Was this answer helpful?

Related Articles

Accessing Your Files

There are a number of ways to access and edit your files. The most obvious is using FTP. But for...

How To Add a Warning Message To SSH

You've seen the warning messages when a hacker tries to enter a server and it says something...

How to secure SSH - Part 1

In Part 1, we'll be discussing various ways to secure your SSH terminal. Before attempting any of...

Useful CLI Commands

echo $SHELL: Tells you what shell you are in. Yes, there are different types of shells but bash...

How To Change File and Directory Permissions

Sometimes when we upload files via FTP software or install mods or plugins via a forum or blog,...