Restart sshd linux (service, daemon)

Written by
Date: 2011-05-15 10:36:30 00:00

Introduction

This is an easy one, but anyway if someone, sometime need it, I'll write here how to restart the ssh service or the sshd daemon

First, sshd is:

Secure Shell or SSH is a network protocol that allows data to be exchanged using a secure channel between two networked devices.[1] The two major versions of the protocol are referred to as SSH1 or SSH-1 and SSH2 or SSH-2. Used primarily on Linux and Unix based systems to access shell accounts, SSH was designed as a replacement for Telnet and other insecure remote shells, which send information, notably passwords, in plaintext, rendering them susceptible to packet analysis.[2] The encryption used by SSH is intended to provide confidentiality and integrity of data over an unsecured network, such as the Internet.

Restart sshd Linux

Debian / Ubuntu

/etc/init.d/ssh restart

CentOS / Fedora / Redhat / RHEL

/etc/init.d/sshd restart

Arch Linux

/etc/rc.d/sshd restart

Slackware

/etc/rc.d/rc.sshd restart

If you know some other distribution that makes it any different, let us know please.

Note: Consider that if you do it remotely, you will not be signed out, unless of course there is something wrong with the configuration and the sshd daemon would not start again, so be careful