SSH gives you a command line on your Instant Access Internet Services hosting account, which is handy for tools like Git, WP-CLI, Composer and bulk file work. This guide explains how to use cPanel's built-in Terminal, how to connect with SSH from your own computer, and how to create and authorize SSH keys in cPanel.
Before you start
- Commands run with your account's full permissions. A wrong command (for example a careless
rm) can delete your website or email, so only use the command line if you're comfortable with it. Backups are kept, but restoring takes time. - Your account runs in a secure, isolated environment (CloudLinux CageFS), so you see your own files and common tools, not the rest of the server. You can't use
sudoor install system software. - Repeated failed logins can get your IP address temporarily blocked by the firewall. If you suddenly can't connect to anything, open a ticket with your IP address from whatismyipaddress.com.
- If you don't see Terminal in cPanel, or SSH logins are refused with the correct password, your account may not have shell access turned on. Open a ticket and ask.
How to use Terminal in cPanel
Terminal is the quickest way to get a command line: it runs in your browser, so there's nothing to install.
- Log in to cPanel and go to Advanced > Terminal.
- The first time, read the warning and click I understand and want to proceed. It won't be shown again.
- A command prompt opens in your home directory (
/home/username). Trylsto list your files orcd public_htmlto go to your website folder.
If you log out of cPanel, open Terminal sessions close shortly afterwards (commands already running keep going). Click Reconnect to start a new session.
How to connect with SSH from your computer
Windows 10 and 11, macOS and Linux all include an SSH client. Open Terminal (Mac/Linux) or Windows Terminal / PowerShell (Windows) and run:
ssh username@example.com
Replace username with your cPanel username and example.com with your domain (or secure.instantaccess.net if your domain isn't pointed at us yet). The first time, type yes to accept the server's fingerprint, then enter your cPanel password. SSH uses the standard port, 22, so you don't need to specify it. PuTTY also works if you prefer it: enter the same host name, port 22 and connection type SSH.
How to set up SSH keys (recommended)
An SSH key lets you log in without typing your password, and is much harder to guess. You can create the key on your own computer (best) or in cPanel.
Option 1: Create a key on your computer and import the public key
- On your computer, run
ssh-keygen -t ed25519 -C "you@example.com"and press Enter to accept the default location. Set a passphrase for extra protection if you like. - Display the public key:
cat ~/.ssh/id_ed25519.pub(on Windows:type $env:USERPROFILE\.ssh\id_ed25519.pubin PowerShell). Copy the whole line. - In cPanel, go to Security > SSH Access and click Manage SSH Keys.
- Click Import Key, give it a name (for example
laptop), paste the line into the public key box, and leave the private key box empty. Click Import. - Go back to Manage SSH Keys. Under Public Keys, click Manage next to the new key, then click Authorize.
Your private key never leaves your computer, which is the safest arrangement.
Option 2: Generate a key in cPanel
- Go to Security > SSH Access > Manage SSH Keys and click Generate a New Key.
- Enter a Key Name (or keep
id_rsa), a strong Key Password, choose RSA as the Key Type and a key size of 4096, then click Generate Key. - Back on Manage SSH Keys, click Manage next to the new public key and click Authorize. A key won't work until it's authorized.
- Under Private Keys, click View/Download next to the key and download it to your computer. Store it somewhere safe (for example
~/.ssh/). PuTTY users can load it into PuTTYgen to save it in PuTTY's.ppkformat. - Connect with
ssh -i path/to/key username@example.comand enter the key password when asked.
Troubleshooting
"Permission denied (publickey,password)"
Check the username is your cPanel username (not your email address), and that the key is authorized in Manage SSH Keys. On your computer, private key files must be readable only by you: on Mac/Linux run chmod 600 ~/.ssh/id_ed25519.
The connection times out
Your IP address may have been blocked after failed logins, or your network may block outgoing SSH. Try Terminal in cPanel instead, and open a ticket with your IP address if the problem continues.
How do I stop a key from working?
In Manage SSH Keys, click Manage next to the key and choose Deauthorize, or use Delete Key to remove it completely. Do this straight away if a laptop with your key is lost or stolen.
Related guides
- How to Use Git Version Control in cPanel
- How to Set Up a Cron Job in cPanel
- File and Folder Permissions Explained (644 and 755)
- How to Change Your cPanel Password
Still stuck? Open a support ticket and the Instant Access Internet Services team will help.
