# Connect to a Linux server using SSH

## What you need

Use the IP address, SSH port, username and authentication details provided for your service. Your welcome email or control panel may contain these details.

## Open an SSH connection

In a terminal, replace the example values with your server details:

```
ssh username@server-ip -p 22
```

Use the assigned SSH port if it differs from 22. Verify the server fingerprint before accepting a new host key. SSH passwords do not display characters while you type.

### Optional: save one VPS connection in your SSH client

This is a client-side example for OpenSSH 9.x on Linux or macOS. It helps avoid retyping the wrong username or port; it does not reset a password or change the VPS. Check your client version with `ssh -V`. For another SSH application, use its saved-session interface instead.

On your own computer, save a private backup of `~/.ssh/config` if it already exists. Add this block near the top, before general `Host *` defaults, without replacing the rest of the file. Use a unique alias and do not duplicate an existing block. Replace `vps.example.com` and `YOUR_LINUX_USER` with your assigned address and Linux username; replace port 22 if your service specifies another port. Keep passwords and private-key contents out of this file.

```text
Host cloudexa-example-vps
    HostName vps.example.com
    User YOUR_LINUX_USER
    Port 22
    ConnectTimeout 10
    ConnectionAttempts 1

```

Check the effective settings without connecting:

```bash
ssh -G cloudexa-example-vps
```

Confirm the hostname, user and port in the output; it can contain local paths, so do not publish it in full. When those values are correct, connect with `ssh cloudexa-example-vps` and verify any new fingerprint through a trusted source. This example leaves host-key and authentication protections unchanged. To undo it, remove only this block or restore your saved client configuration. It never belongs in the VPS's `/etc/ssh/sshd_config`.

References: OpenSSH [client configuration](https://man.openbsd.org/ssh_config) and [ssh command options](https://man.openbsd.org/ssh).

## Keep access secure

Use a strong unique password or an SSH key. Before changing SSH or firewall settings, keep an existing session open and confirm you have a working recovery console. Never disable your only working login method before testing its replacement.