How do I connect to a website via SSH

SSH (Secure Shell) is a secure method of remotely accessing and managing your website files. It allows you to perform advanced operations such as configuration changes, file management, and command execution directly within your hosting environment — all through an encrypted and authenticated connection.

SSH access is available for advanced users who are familiar with command-line tools. You can connect securely using either two-factor authentication (2FA) or public/private key pairs.

Note:
• It may take up to 30 minutes for your public key to fully propagate after setup.
• If your SSH session closes immediately, your account may have been locked due to unauthorized commands. Please contact support for assistance.

⚙️ Connecting via SSH (Windows)

If you’re on Windows, you’ll need an SSH client. We recommend PuTTY, which is free and widely used.

1. Download PuTTY from the official website:
👉 https://www.chiark.greenend.org.uk/~sgtatham/putty/latest.html

2. Open PuTTY Key Generator (PuTTYgen) on your computer.

3. Click Generate and move your mouse around the blank area to create randomness — this generates your public key.

4. (Optional) Add a passphrase for extra security. This will act as your SSH password.

5. Log in to your hosting control panel and go to Manage Hosting → Security → SSH Access.

6. Paste your public key from PuTTYgen into the Public Key box and click Add Public Key.

7. Go back to PuTTYgen and click Save Private Key to store your private key securely on your device.

8. Open PuTTY, navigate to Connection → SSH → Auth → Credentials, and under Private key file for authentication, click Browse and select your saved private key.

9. Under Session, enter your SSH Hostname — for example: ssh.yourserverhostname.com

10. Click Open. When prompted, enter your username (usually your domain name) and the passphrase you set earlier.

You are now connected to your website via SSH.

 

Connecting via SSH (Linux)

1. Open your Terminal and navigate to the folder where you want to store your SSH keys.

2. Run: ssh-keygen. Follow the prompts to name your key and set a passphrase (optional).

3. Once the keys are generated, locate your public key file (it will end in .pub).

4. View the contents of your public key using: cat ~/.ssh/id_rsa.pub

5. Copy the entire key output.

6. Log in to your hosting control panel → Security → SSH Access, and paste the key into the Public Key box. Then click Add Public Key.

7. To connect, run: ssh -i ~/.ssh/id_rsa username@ssh.yourserverhostname.com

8. When prompted, enter your passphrase (if you set one). You should now have full SSH access to your hosting account.

 

Connecting via SSH (macOS)

1. Open Terminal on your Mac.

2. Generate your SSH keys by typing: ssh-keygen. Press Enter to accept the default file location and optionally add a passphrase.

3. View your public key: cat ~/.ssh/id_rsa.pub

4. Copy the full key output.

5. Log in to your hosting control panel → Security → SSH Access, and paste your key into the Public Key field. Click Add Public Key.

6. Wait a few minutes for setup to complete.

7. Back in Terminal, connect using: ssh username@ssh.yourserverhostname.com

8. When asked to confirm, type yes and press Enter.

9. You should now be successfully connected to your website via SSH from your Mac.

 

✅ Tips for Secure SSH Usage

Always keep your private key file safe and never share it.

Disable password login where possible and use key authentication.

Avoid running commands with sudo unless you fully understand their impact.

Log out after each session using exit.