> ## Knowledge Base Index
> Fetch the complete knowledge base index at: https://helpdesk.gbnetwork.com/sitemap.xml
> Use this file to discover available pages before exploring further.
> Pure-Markdown content can be obtained by appending a '.md' suffix to the content URLs listed in the sitemap (without the trailing slash).

# How to connect to a VPS with SSH (Windows,OS X,Linux) ?

| Connecting with SSH (Secure Shell)

**Understanding SSH**

SSH (Secure Shell) is a cryptographic network protocol for operating network services securely over an unsecured network. It's commonly used for remote command-line login 1 and remote command execution.
---

###### Prerequisites

```
VPS Details: You'll need the following information of your VPS:
IP address : Check Your Email
Username : root
Password : Check Your Email
SSH port : 22
```
---

###### Connecting via SSH

* ** macOS and Linux** - macOS and most Linux distributions have SSH built-in, making it very straightforward.

**Using Terminal:**

```
1. Open your Terminal application.
2. Use the following command, replacing the placeholders with your actual VPS details: `ssh username@vps_ip_address -p port_number`
3. If this is your first time connecting to the VPS, you'll be prompted to verify the host's authenticity. Type "yes" and press Enter.
4. Enter your password when prompted.
```

* **Windows** - Windows does not have SSH built-in by default, but there are several excellent options:

1. **Windows Terminal and OpenSSH **

###### Windows 10 and later versions include OpenSSH.

![Windows Terminal](https://storage.crisp.chat/users/helpdesk/website/-/6/7/9/3/67938060e89a4400/chrome-1742651712_14wg8i9.png)

* Open Windows Terminal or PowerShell.

![Windows Terminal](https://storage.crisp.chat/users/helpdesk/website/-/6/7/9/3/67938060e89a4400/windowsterminal-1742670349_n94sae.png)

* Use the same SSH command as in macOS/Linux: `ssh root@vps_ip_address -p 22`
* Congrats you have logged in to your VPS

2. PuTTY:
###### PuTTY is a popular, free SSH client for Windows.

* Download and install PuTTY from https://www.putty.org/.
![Download Putty](https://storage.crisp.chat/users/helpdesk/website/-/6/7/9/3/67938060e89a4400/chrome-1742669298_1vqwze4.png)

* Open PuTTY.
![Open Putty](https://storage.crisp.chat/users/helpdesk/website/-/6/7/9/3/67938060e89a4400/sharex-1742669448_ri1rvb.png)

* In the "Host Name (or IP address)" field, enter your VPS's IP address (or hostname).
* In the "Port" field, enter the SSH port (usually 22).
* Click "Open."

![VPS Details](https://storage.crisp.chat/users/helpdesk/website/-/6/7/9/3/67938060e89a4400/putty-1742669187_584nyg.png)

* If this is your first time connecting, you'll see a security alert. Click "Accept."
* Enter your username and password when prompted.

---

**Important Security Considerations**

* **Use SSH Keys:** SSH keys are significantly more secure than passwords.
* **Disable Password Authentication:** Once you've set up SSH keys, disable password authentication on your VPS to prevent brute-force attacks. Edit the `/etc/ssh/sshd_config` file and set `PasswordAuthentication no`. Then restart the SSH service.
* **Change Default SSH Port:** Consider changing the default SSH port (22) to a higher, non-standard port to reduce automated attacks.
* **Firewall:** Configure your VPS firewall (e.g., `ufw` on Ubuntu) to allow only necessary SSH connections.
* **Keep Your System Updated:** Regularly update your VPS and local machine to patch security vulnerabilities.
* **Strong Passphrases:** If you do use a password, use a strong, unique one.
* **Limit Root Access:** Create a non-root user for regular tasks and use `sudo` for administrative commands.

By following these steps and security considerations, you can securely connect to your VPS from any major operating system.