Get a free website with any plan

See how
HOSTING

Using SSH: keys, connecting, and 15 commands worth knowing

IN SHORT

Flashcloud sets up SSH access through cPanel's SSH Access tool: generate or import a key pair, authorize it, then connect from your terminal with ssh -i ~/.ssh/your_private_key username@yourdomain.com. Key auth skips passwords entirely and is safer against a compromised client.

SSH gives you a direct command-line connection to your hosting, on plans that support SSH. If your plan includes it, you'll set up key-based access from cPanel's SSH Access tool, then connect from your terminal with a standard ssh command. Key auth is safer and more convenient than a password: no credentials to type on every connection, and no password to leak from a compromised client.

This article covers generating a key pair, getting connected, and fifteen commands that cover most of what you'd actually do once you're in.

Setting up key-based access

Open cPanel from your hosting service, then find SSH Access under Security. From there you can generate a new key pair or import a public key you already have.

  • If you generate a key in cPanel, download the private key immediately, it's only shown once.
  • If you already have a key pair on your machine, generate one with ssh-keygen -t ed25519 -C "your-email@example.com" and paste the public key (the .pub file) into cPanel's import field.
  • Authorize the key. cPanel adds it to ~/.ssh/authorized_keys on the server for you, so there's no manual file editing involved.

Use a passphrase on the private key itself. It's a second layer if the key file ever ends up somewhere it shouldn't. An ssh-agent will cache the unlocked key for your session so you're not typing the passphrase on every connection.

Connecting

From a terminal, connect with:

ssh -i ~/.ssh/your_private_key username@yourdomain.com

If you saved the key at the default path (~/.ssh/id_ed25519 or ~/.ssh/id_rsa), you can drop the -i flag entirely, SSH checks the default locations automatically. The username here is your hosting account username, the same one used for FTP and SFTP. See changing your hosting account password if you need a refresher on where that account-level password lives (it's separate from your key, and only needed if you fall back to password auth).

First connection will prompt you to confirm the server's fingerprint. Accept it, and SSH remembers the server for future connections.

15 commands worth knowing

These cover navigation, file management, and basic diagnostics without touching anything you shouldn't on shared infrastructure.

  1. pwd, prints your current directory. Good first command after connecting, so you know where you landed.
  2. ls -la, lists files including hidden ones, with permissions and sizes.
  3. cd public_html, moves into your site's document root.
  4. cat filename, prints a file's contents to the screen. Good for quick checks, not for editing.
  5. tail -f error_log, streams a log file live as new lines are written. Stop it with Ctrl+C.
  6. grep "search term" file.log, searches a file for a string. Add -r to search recursively through a directory.
  7. du -sh *, shows the size of each file and folder in the current directory, useful for finding what's eating storage.
  8. df -h, shows overall disk usage for your account.
  9. cp source.txt destination.txt, copies a file. Add -r to copy a directory.
  10. mv oldname.txt newname.txt, moves or renames a file.
  11. rm filename, deletes a file. There's no undo, double-check the path before running it, and never run rm -rf without being certain of the target.
  12. chmod 644 filename, sets file permissions. 755 is the usual setting for directories and executable scripts.
  13. tar -czvf archive.tar.gz foldername, compresses a folder into a single archive, handy before a big move or as a manual backup.
  14. unzip archive.zip, extracts a zip archive in place.
  15. which php, prints the path to the active PHP binary, useful when a script behaves differently on the command line than it does in the browser.

Where SSH fits with other ways to manage your site

SSH is one of a few ways to work with your files directly. If you're deploying from a repository instead of managing files by hand, see deploying with git, key-based auth is the same idea applied to automated deploys, so the setup above doubles as prep work for CI. If you're running a Node.js process rather than poking around static files, deploying a Node.js app covers the cPanel Node.js Selector, which manages the process for you instead of running it manually from a shell.

For anything destructive or unfamiliar, run it on a test file first, or open a ticket from Support in the portal before you touch production. Real humans staff the tickets and live chat, and they'd rather walk you through a risky command than clean up after one.

Common questions

How do I get SSH access on my Flashcloud plan?

Open SSH Access under Security in cPanel, then generate a new key pair or import one you already have. cPanel authorizes the key on the server for you, so there's no manual file editing.

Why use a key instead of a password for SSH?

A key is safer and more convenient: no credentials to type on every connection, and no password to leak if your client gets compromised. Add a passphrase to the private key itself for a second layer, and let ssh-agent cache it so you're not retyping on every connection.

What username do I connect with over SSH?

Your hosting account username, the same one you use for FTP and SFTP. It's separate from your SSH key and only matters for password auth or account-level tasks.

Is it safe to run rm or chmod commands over SSH?

Only if you double-check the path first. rm has no undo, so verify the target before running it, and never run rm -rf without being certain what it targets. For anything unfamiliar, test on a non-production file first or open a support ticket.

Do I need SSH if I deploy with Git or run Node.js?

Not necessarily. Git deploys use the same key-based auth as prep for CI, and Node.js apps run through cPanel's Node.js Selector, which manages the process instead of you running it manually from a shell.

CAN'T FIND IT?

Real humans answer fast.

Hosting with us? Open a ticket and a real person replies - no scripts, no upsells. Still choosing a host? The same team is included with every plan, from day one.