# How to change the SSH Port

Navigate to the Neevcloud dashboard to click on the server <br>

<figure><img src="https://1876135298-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FEC5NwtFshv6EATOemuUn%2Fuploads%2Ft3n5Rq5jpaJLIMCyKKTe%2Fimage.png?alt=media&#x26;token=ab3ee940-acc7-4524-abc5-149aebd3cf3b" alt=""><figcaption></figcaption></figure>

Now set the password

<figure><img src="https://1876135298-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FEC5NwtFshv6EATOemuUn%2Fuploads%2FLPbYSbNubxZpzXTPMdUS%2Fimage.png?alt=media&#x26;token=944bebb5-6670-4c89-90af-e8e3b18aad78" alt=""><figcaption></figcaption></figure>

Now open the console

<figure><img src="https://1876135298-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FEC5NwtFshv6EATOemuUn%2Fuploads%2F5GI1LVROsRPClx99ZzYr%2Fimage.png?alt=media&#x26;token=063bc327-c663-45b4-ae39-8ea675d27b88" alt=""><figcaption></figcaption></figure>

Now, enter the username and password.

<figure><img src="https://1876135298-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FEC5NwtFshv6EATOemuUn%2Fuploads%2FWVAiwbdMqAhDXYezojer%2Fimage.png?alt=media&#x26;token=ee1973dd-7a14-429f-83b3-158524f1c726" alt=""><figcaption></figcaption></figure>

Next, open the SSH configuration file and change port 22 to any value between 30,000 and 65,000.

Run the following command to open the ssh file.

```
vi /etc/ssh/sshd_config
```

Now, uncomment the port, remove 22, and set it to any port number.

Also, uncomment the `PermitRootLogin` directive and change its value from `no` to `yes`.

<figure><img src="https://1876135298-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FEC5NwtFshv6EATOemuUn%2Fuploads%2F3W6pr4aDyR56XqZHXqM0%2Fimage.png?alt=media&#x26;token=9cff98f4-5544-4789-bad3-90a3bc43e497" alt=""><figcaption></figcaption></figure>

Also, comment out the PasswordAuthentication **no** line.

<figure><img src="https://1876135298-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FEC5NwtFshv6EATOemuUn%2Fuploads%2FCRS5hOWw2VJzf5OdgZOZ%2Fimage.png?alt=media&#x26;token=bd31471a-8427-4c3e-bba9-a942562ac338" alt=""><figcaption></figcaption></figure>

After this run the ssh restart command&#x20;

```
systemctl restart sshd
```

Here is the corrected sentence:

* **Now access the server using the changed SSH port.**

<figure><img src="https://1876135298-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FEC5NwtFshv6EATOemuUn%2Fuploads%2F31VhMnSrivEdn2gf8PxY%2Fimage.png?alt=media&#x26;token=28d598bd-68f3-424f-8508-d05999c3358f" alt=""><figcaption></figcaption></figure>
