How do I connect to my VPS via SSH (Secure Shell) terminal?

To connect to your VPS via SSH (Secure Shell), follow these steps based on your operating system and preferred SSH client:


### **For Linux and macOS Users**


1. **Open Terminal:**

   - On Linux: Search for "Terminal" in your applications menu.

   - On macOS: Open "Terminal" from the Applications > Utilities folder.


2. **Use the SSH Command:**

   - **Command Syntax:**

     ```bash

     ssh [username]@[server-ip]

     ```

   - **Example:**

     ```bash

     ssh [email protected]

     ```

   - **Explanation:**

     - Replace `[username]` with your VPS username (often `root` or another user you created).

     - Replace `[server-ip]` with your VPS’s IP address.


3. **Enter Your Password:**

   - After running the command, you'll be prompted to enter your password. Type it in (note: your password won't be displayed on the screen as you type) and press Enter.


4. **Verify Host Key (First Time Connection):**

   - The first time you connect, you might see a message asking if you want to continue connecting and add the host to your list of known hosts. Type `yes` and press Enter.


5. **You’re Connected:**

   - Once authenticated, you’ll have access to the command line interface of your VPS.


### **For Windows Users**


1. **Install an SSH Client:**

   - **PuTTY:** A popular SSH client for Windows. Download it from [PuTTY’s official site](https://www.putty.org/).


2. **Open PuTTY:**

   - **Configuration Window:**

     - **Host Name (or IP address):** Enter your VPS’s IP address.

     - **Port:** Enter `22` (default SSH port).

     - **Connection Type:** Ensure `SSH` is selected.


3. **Connect:**

   - Click **"Open"** to initiate the connection.


4. **Log In:**

   - A terminal window will open. Enter your username (e.g., `root`) and press Enter.

   - Enter your password when prompted and press Enter.


5. **Save Session (Optional):**

   - In the PuTTY configuration window, you can save the session settings by typing a name in the "Saved Sessions" field and clicking **"Save"**. This allows you to quickly connect in the future.


### **For Mobile Devices**


1. **Install an SSH App:**

   - **iOS:** Use an app like `Termius` or `Prompt`.

   - **Android:** Use an app like `JuiceSSH` or `Termius`.


2. **Connect:**

   - Open the app and configure a new SSH connection.

   - **Host Name:** Enter your VPS’s IP address.

   - **Username:** Enter your VPS username.

   - **Password:** Enter your VPS password.


3. **Connect:**

   - Tap on the connect button to start the SSH session.


### **Summary**


1. **Linux/macOS:**

   - Open Terminal.

   - Use the command: `ssh [username]@[server-ip]`.

   - Enter your password and verify the host key if prompted.


2. **Windows:**

   - Install PuTTY.

   - Enter VPS IP address, port `22`, and select SSH.

   - Click **"Open"** and log in with your credentials.


3. **Mobile Devices:**

   - Install an SSH app.

   - Configure a new connection with your VPS details and connect.


By following these steps, you’ll be able to securely connect to your VPS via SSH from various devices.