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

# Connect via SSH

> How to connect to your Linux VPS via SSH

## Overview

SSH (Secure Shell) is the standard for secure connections to Linux servers. This guide shows you how to connect from different operating systems.

## Find Your Credentials

In your [Dashboard](https://rdp.sh/dashboard/servers), you'll find all necessary information:

| Information    | Description                 |
| -------------- | --------------------------- |
| **IP Address** | Your server's public IP     |
| **Username**   | `root` (default)            |
| **Password**   | The generated root password |
| **Port**       | Default: `22`               |

***

## Establish Connection

<Tabs>
  <Tab title="Windows">
    ### Windows Terminal / PowerShell (Windows 10+)

    Windows 10 and 11 have SSH built-in.

    <Steps>
      <Step title="Open Terminal">
        * Press `Win + X` and select **Windows Terminal**
        * Or search for **PowerShell** in the Start menu
      </Step>

      <Step title="Start SSH Connection">
        ```bash theme={null}
        ssh root@YOUR-IP-ADDRESS
        ```

        Example:

        ```bash theme={null}
        ssh root@185.193.xxx.xxx
        ```
      </Step>

      <Step title="Confirm Connection">
        On first connection, you'll see a fingerprint warning:

        ```
        The authenticity of host '185.193.xxx.xxx' can't be established.
        ED25519 key fingerprint is SHA256:xxxxx
        Are you sure you want to continue connecting (yes/no)?
        ```

        Type `yes` and press Enter.
      </Step>

      <Step title="Enter Password">
        Enter the password from your dashboard.

        <Note>
          The password won't be displayed as you type - this is normal!
        </Note>
      </Step>
    </Steps>

    ### PuTTY (Alternative)

    <Steps>
      <Step title="Download PuTTY">
        Download [PuTTY](https://www.putty.org/) and install it.
      </Step>

      <Step title="Configure Connection">
        1. Open PuTTY
        2. **Host Name**: Your IP address
        3. **Port**: 22 (or your custom port)
        4. **Connection type**: SSH
      </Step>

      <Step title="Connect">
        1. Click **Open**
        2. Accept the security warning with **Accept**
        3. Login: `root`
        4. Password: Your password
      </Step>
    </Steps>

    <Tip>
      Save your connection in PuTTY under **Saved Sessions** for quick access.
    </Tip>
  </Tab>

  <Tab title="macOS">
    ### Terminal

    macOS has SSH built-in.

    <Steps>
      <Step title="Open Terminal">
        * Spotlight: `Cmd + Space`, type "Terminal"
        * Or: Finder → Applications → Utilities → Terminal
      </Step>

      <Step title="Start SSH Connection">
        ```bash theme={null}
        ssh root@YOUR-IP-ADDRESS
        ```
      </Step>

      <Step title="Confirm Fingerprint">
        Confirm with `yes` on first connection.
      </Step>

      <Step title="Enter Password">
        Enter your password (won't be displayed).
      </Step>
    </Steps>

    ### iTerm2 (recommended)

    [iTerm2](https://iterm2.com/) is a better terminal with more features:

    * Split Panes
    * Better search
    * Profiles for different servers
  </Tab>

  <Tab title="Linux">
    ### Terminal

    Every Linux distribution has SSH pre-installed.

    ```bash theme={null}
    ssh root@YOUR-IP-ADDRESS
    ```

    **With different port:**

    ```bash theme={null}
    ssh -p 2222 root@YOUR-IP-ADDRESS
    ```

    **Verbose mode (for debugging):**

    ```bash theme={null}
    ssh -v root@YOUR-IP-ADDRESS
    ```
  </Tab>

  <Tab title="iOS / Android">
    ### Mobile SSH Apps

    **iOS:**

    * [Termius](https://apps.apple.com/app/termius-terminal-ssh-client/id549039908) (recommended)
    * [Prompt 3](https://apps.apple.com/app/prompt-3/id1594420480)

    **Android:**

    * [Termius](https://play.google.com/store/apps/details?id=com.server.auditor.ssh.client)
    * [JuiceSSH](https://play.google.com/store/apps/details?id=com.sonelli.juicessh)

    Setup is similar:

    1. Create new connection
    2. Enter host/IP
    3. Username: `root`
    4. Enter password
    5. Connect
  </Tab>
</Tabs>

***

## Useful SSH Commands

After logging in, you can use these commands:

### System Information

```bash theme={null}
# Show operating system
cat /etc/os-release

# System resources
htop  # or: top

# Disk space
df -h

# RAM usage
free -h

# Network interfaces
ip addr
```

### File Management

```bash theme={null}
# List directory
ls -la

# Change directory
cd /var/www

# Create/edit file
nano filename.txt

# Copy file
cp source.txt destination.txt

# Delete file
rm filename.txt
```

### Install Software

```bash theme={null}
# Debian/Ubuntu
apt update && apt upgrade -y
apt install packagename

# CentOS/AlmaLinux
dnf update -y
dnf install packagename
```

***

## Troubleshooting

<AccordionGroup>
  <Accordion title="Connection refused">
    **Possible causes:**

    * Server hasn't started yet
    * SSH service not running
    * Firewall blocking port 22

    **Solution:**

    1. Wait 1-2 minutes after deployment
    2. Check in dashboard if server is "Running"
    3. Check firewall settings
  </Accordion>

  <Accordion title="Connection timed out">
    **Possible causes:**

    * Wrong IP address
    * Network issues
    * Server is offline

    **Solution:**

    1. Verify IP address in dashboard
    2. Try a ping: `ping YOUR-IP`
    3. Restart server in dashboard
  </Accordion>

  <Accordion title="Permission denied (publickey,password)">
    **Possible causes:**

    * Wrong password
    * Root login is disabled
    * Only SSH key auth allowed

    **Solution:**

    1. Copy password again (without spaces)
    2. For reinstalled servers: Use the new password
  </Accordion>

  <Accordion title="Host key verification failed">
    The server was reinstalled and has a new key.

    **Solution:**

    ```bash theme={null}
    ssh-keygen -R YOUR-IP-ADDRESS
    ```

    Then connect again.
  </Accordion>
</AccordionGroup>

***

## Security Tips

<Warning>
  Secure your server after the first login!
</Warning>

### Immediate Actions

<Steps>
  <Step title="Update System">
    ```bash theme={null}
    # Debian/Ubuntu
    apt update && apt upgrade -y

    # CentOS/AlmaLinux
    dnf update -y
    ```
  </Step>

  <Step title="Change Root Password">
    ```bash theme={null}
    passwd
    ```

    Choose a strong password with at least 16 characters.
  </Step>

  <Step title="Set Up SSH Keys">
    For better security, we recommend SSH keys instead of passwords.

    <Card title="Set Up SSH Keys" icon="key" href="/docs/getting-started/ssh-keys">
      Follow our guide for SSH key authentication
    </Card>
  </Step>
</Steps>

### Advanced Security

* **Install Fail2ban**: Blocks IPs after failed login attempts
* **Change SSH Port**: From 22 to another port
* **Disable Root Login**: Use a regular user + sudo

***

## Next Steps

<CardGroup cols={2}>
  <Card title="Set Up SSH Keys" icon="key" href="/docs/getting-started/ssh-keys">
    Secure authentication without passwords
  </Card>

  <Card title="Configure Firewall" icon="shield" href="/docs/faq/ddos-protection">
    Protect your server with firewall rules
  </Card>
</CardGroup>
