SSH is an encrypted terminal connection to your server. With it you can install software, read logs, move files and run scheduled jobs.
What you need
- The server's IP address
- A username —
rooton a VPS or dedicated server; your cPanel username on cloud hosting - The password or an SSH key
- The port — 22 on a VPS or dedicated server unless you changed it
macOS and Linux
Open Terminal and run:
ssh [email protected]On cloud hosting, shell access runs on port 2222 with your cPanel username:
ssh -p 2222 [email protected]The first time, the terminal shows the server's fingerprint and asks you to accept it.
Windows
Windows 10 and later include the same ssh command in PowerShell. Otherwise use PuTTY or WinSCP: enter the IP address and the port, then sign in with the username and password.
Shell access on cloud hosting
Shell access is off until you switch it on:
- Open the hosting service in your control panel and click Manage service.
- Click Shell access and confirm.
- Connect on port 2222 with your cPanel username.
If the connection is refused
| Symptom | Usual cause |
|---|---|
| Connection times out | A firewall rule — yours or the server's. See Protect a server with a firewall |
| Password refused | Wrong username, or the password was changed. Reset the root password |
| Host key warning | The server was rebuilt. Remove the old entry from ~/.ssh/known_hosts |
Tip
Use an SSH key instead of a password: copy your public key into ~/.ssh/authorized_keys on the server, then disable password sign-in. It removes password guessing as a risk entirely.