Introduction
SSH (Secure Shell) provides a secure way to access your website's files and execute commands remotely. This guide will walk you through connecting to your Hostnin cloud hosting via SSH.
Prerequisites
Before getting started, make sure you have:
- SSH client: Most operating systems include an SSH client by default
- Windows: PowerShell or PuTTY
- macOS/Linux: Terminal
- Your SSH login details:
- Server hostname or IP address
- SSH username and password
- Port number (default: 22)
You can find these details in your Hostnin cloud control panel.
Enabling SSH Access
SSH access might not be enabled by default. To enable it:
- Log into your Hostnin cloud hosting account
- Use the search bar to locate the SSH Access section
- Enable SSH if it is disabled
Connecting via SSH
For macOS or Linux Users
- Open the Terminal application
- Run this command:
ssh username@yourserverhostname -p 22 - Confirm the server's fingerprint by typing
yes - Enter your password (it won't be visible as you type)
- You'll be logged into your WordPress site's root directory
For Windows Users (PowerShell)
- Open PowerShell
- Use the same command as above
- Enter your password when prompted
For Windows Users (PuTTY)
- Download and install PuTTY from putty.org
- Open PuTTY and enter your server hostname in the Host Name field
- Set the Port to 22
- Click Open to connect
- Enter your credentials when prompted
Managing SSH Keys
For better security, set up SSH keys to avoid entering passwords:
Generate SSH Keys (Linux/macOS)
Run: ssh-keygen -t rsa -b 2048
Then add the public key to your Hostnin control panel under SSH Access.
Common SSH Commands
| Command | Description |
|---|---|
ls | List files and directories |
cd [directory] | Change directory |
mkdir [name] | Create new directory |
rm [file] | Remove a file |
wp plugin list | List WordPress plugins (WP-CLI) |
Troubleshooting
- Connection refused: Check if SSH is enabled in your control panel
- Permission denied: Verify your username and password
- Host key verification failed: Remove the old key and try again
Conclusion
SSH access gives you powerful control over your hosting environment. Use it responsibly and always keep your credentials secure.
Written by
Hostnin Team
Technical Writer