> ## Documentation Index
> Fetch the complete documentation index at: https://docs.edisglobal.com/llms.txt
> Use this file to discover all available pages before exploring further.

# How to Update SSHD on Debian, Ubuntu, and Red Hat Linux

> Update OpenSSH Server (SSHD) on Debian, Ubuntu, and Red Hat Enterprise Linux. Step-by-step guide to keep your VPS secure with the latest SSH patches.

### How to update SSHD on Debian, Ubuntu, and red hat Linux

Keeping your SSHD (OpenSSH Server) updated is crucial for maintaining the security and stability of your servers. Follow these simple steps to update SSHD on Debian, Ubuntu, and Red Hat Linux systems.

### Updating SSHD on Debian

**Update Package Lists**:
Run the following command to ensure your package lists are up-to-date:

```sh theme={"system"}
sudo apt-get update
```

**Upgrade OpenSSH**:
Upgrade the OpenSSH server package to the latest version:

```sh theme={"system"}
sudo apt-get install --only-upgrade openssh-server
```

**Restart SSH Service**:
Restart the SSH service to apply the updates:

```sh theme={"system"}
sudo systemctl restart ssh
```

### Updating SSHD on Ubuntu

**Update Package Lists**:
Refresh your package lists with the latest updates:

```sh theme={"system"}
sudo apt-get update
```

**Upgrade OpenSSH**:
Upgrade to the latest version of the OpenSSH server:

```sh theme={"system"}
sudo apt-get install --only-upgrade openssh-server
```

**Restart SSH Service**:
Restart the SSH service to implement the updates:

```sh theme={"system"}
sudo systemctl restart ssh
```

### Updating SSHD on red hat

**Update Package Lists**:
Check for available updates:

```sh theme={"system"}
sudo yum check-update
```

**Upgrade OpenSSH**:
Update the OpenSSH server to the latest version:

```sh theme={"system"}
sudo yum update openssh-server
```

**Restart SSH Service**:
Restart the SSH service to ensure the updates take effect:

```sh theme={"system"}
sudo systemctl restart sshd
```
