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

# How to Update SSH Port in ORIV?

> Strengthen your ORIV server security through  update SSH port. This guide shows you how to do it using the terminal and the ORIV web GUI. Follow the steps a

The SSH port is the doorway you use to connect to your server securely. Changing the default port (22) adds an extra layer of security. This documentation will show how to update SSH port on your [**ORIV**](https://oriv.cloud/) server using the terminal and ORIV Graphic User Interface (GUI).

## **Preparations: Before You Update SSH Port**

Before updating ports check and prepare the following things:

* **Allow the port on your firewall:** You will need to configure your firewall to allow access to the new port you choose. See our guide on [**How to Configure Firewall Management in ORIV**](https://oriv.cloud/docs/how-to-configure-firewall-management-in-oriv/) for detailed instructions.

## **Update the SSH Port Using Terminal**

We will be using the command line to update the SSH port, this method involves directly editing the SSH configuration file and restarting the service as a **sudo user**. Follow the step below to update the SSH port using Terminal.

### **Step 1: Open Terminal**

Open the Terminal and navigate to the SSH configuration file by running the following command with nano:  “**sudo nano sshd\_config**“

> \[!NOTE]
> Precisa de ajuda visual para esta etapa? Entre em contato com o nosso suporte em **[support@oriv.cloud](mailto:support@oriv.cloud)**.

### **Step 2: Update the Port Number**

Look for the line that reads **#Port 22**.  The # symbol indicates a comment, and the actual port number is 22 (the default).  Remove the #symbol and replace **22** with your desired port number. For example, if you want to use port **2222**, the line should look like this:

> \[!NOTE]
> Precisa de ajuda visual para esta etapa? Entre em contato com o nosso suporte em **[support@oriv.cloud](mailto:support@oriv.cloud)**.

Once you have updated the port number, save the changes in your text editor (usually by pressing **Ctrl+O** followed by Enter). Then, exit the editor (typically with **Ctrl+X**).

### **Step 3: Restart SSH Service**

Run the following command in the Terminal to restart the SSH service and apply the new port configuration: “ sudo service ssh restart ”

> \[!NOTE]
> Precisa de ajuda visual para esta etapa? Entre em contato com o nosso suporte em **[support@oriv.cloud](mailto:support@oriv.cloud)**.

Congratulations! You’ve successfully updated the SSH port on your server using the Terminal. Now you have to update it on the ORIV web GUI.

## **Update SSH Port Using ORIV Web GUI**

Now, we will be updating the SSH port in the ORIV web GUI part. Follow the steps shown below and update your SSH port accordingly.

### **Step 1: Go to SSH Configuration Settings**

From your ORIV dashboard, go to **‘Servers**’ and select a server to navigate settings. Click on ‘**Others**’ from the settings menu. Here Update the SSH port Number and click on ‘**Save Settings**’.

> \[!NOTE]
> Precisa de ajuda visual para esta etapa? Entre em contato com o nosso suporte em **[support@oriv.cloud](mailto:support@oriv.cloud)**.

### **Step 2: Add a Rule in Firewall Management**

Now add a SSH Port Rule in your firewall management. To do that navigate from the server overview page go to the ‘**Security**’ menu and click one ‘**Add New Rule**’ button.

> \[!NOTE]
> Precisa de ajuda visual para esta etapa? Entre em contato com o nosso suporte em **[support@oriv.cloud](mailto:support@oriv.cloud)**.

Here, Add your Rule name as **SSH** and add the decided port number. Then click on **‘Add Rule**’ to successfully update the SSH port in ORIV.

> \[!NOTE]
> Precisa de ajuda visual para esta etapa? Entre em contato com o nosso suporte em **[support@oriv.cloud](mailto:support@oriv.cloud)**.

Following these steps, you can successfully update your SSH port on your ORIV server. Remember to choose a strong, non-standard port number and adjust your firewall settings accordingly for optimal security.

Still need help with updating your SSH Port? Contact our [**dedicated support team**](https://support.oriv.cloud/) for any of your queries.
