Hosting Hosting Features Spanish version

Support article

How to Connect via SSH to Your Shared Hosting

Access your shared hosting via SSH (or SFTP): enable access, generate keys, connect from Windows/Mac/Linux and differences with a VPS.

Published: 12/07/2026 Updated: 12/07/2026

Introduction

SSH is a protocol that lets you access your hosting via command line securely, as if you had a terminal open on the server. It’s usually associated with VPS, but many shared hosting plans also include it, though with some limitations.

In this article you’ll see how to connect via SSH to your shared hosting, what it’s for, and how it differs from a VPS.

What SSH is for in shared hosting

SSH access in shared hosting is useful for:

  • Uploading and managing files more efficiently than with FTP.
  • Running commands for maintenance (searching files, viewing logs, compressing).
  • Using WP-CLI to manage WordPress from the command line.
  • Database operations (export, import).
  • Using Git to manage your website’s code.
  • Running scripts for Composer or npm.

If you’ve never used the command line, SSH may not add much for you at first. But if you’re a developer or manage websites frequently, it’s an indispensable tool.

SSH in shared vs VPS

AspectShared hostingVPS
SSH accessLimited (restricted shell)Full (complete shell)
PermissionsYou’re not rootYou’re root
Installing softwareLimitedYou can install whatever you want
Restarting servicesNoYes
CostLowMedium

In shared hosting, SSH is a jailed shell or restricted shell: you can run many commands, but you don’t have administrator privileges. It’s a security measure.

How to enable SSH in your shared hosting

In many hosting plans (including some from miHosting), SSH has to be enabled from cPanel or requested.

If you use cPanel

  1. Log in to cPanel.
  2. Find the SSH Access or SSH Shell Access section.
  3. Click Manage SSH Keys.
  4. If SSH access isn’t active for your account, an option to enable it appears.

In some plans, SSH is active by default. In others, it has to be requested from support because it’s a feature enabled on request. If you don’t see it, open a ticket.

Generate SSH keys

To connect securely (without typing the password each time), you can generate SSH keys:

  1. In cPanel → SSH Access → Manage SSH Keys.
  2. Click Generate a New Key.
  3. Fill in the details (name, key password).
  4. Authorize the public key.

Then download the private key to your computer to use when connecting.

[Imagen sugerida: screenshot of SSH key management in cPanel]

How to connect via SSH

Details you need

To connect you need:

  • Host or server: your domain or the server IP.
  • Username: your cPanel username (the hosting account one, not the WordPress one).
  • Port: usually 22, but some hosts use another (ask if unsure).
  • Password: your cPanel account password, or an SSH key.

From Windows (PowerShell or PuTTY)

With PowerShell (Windows 10/11):

ssh user@yourdomain.com

The first time it asks you to confirm the connection. Type yes and press Enter. Then enter the password.

With PuTTY:

  1. Open PuTTY.
  2. In Host Name, type your domain or IP.
  3. In Port, put 22 (or your host’s).
  4. Click Open.
  5. Enter username and password.

[Imagen sugerida: screenshot of the SSH connection in PuTTY]

From Linux or Mac

Open the terminal:

ssh user@yourdomain.com

Confirm with yes the first time and enter the password.

The password isn’t shown as you type it. That’s normal, it doesn’t mean the keyboard isn’t working.

What you can do with SSH on your hosting

Once connected, you have access to your hosting’s command line. Some useful commands:

pwd                   # see which folder you're in
ls                    # list files
cd public_html        # enter a folder

View and search files

ls -la                # see files in detail
find . -name "*.php"  # search PHP files
du -sh *              # see each folder's size

Compress and decompress

zip -r backup.zip .   # compress everything into a zip
unzip backup.zip      # decompress

Use WP-CLI (for WordPress)

If you have WordPress:

wp plugin list        # see installed plugins
wp plugin update --all  # update all plugins
wp db export backup.sql  # export database

WP-CLI is one of the tools that saves the most time in WordPress. It lets you do from the command line what you’d do with many clicks in the panel.

Work with Git

git clone https://github.com/user/repo.git
git pull
git status

SFTP: the secure alternative to FTP

If what you need is to upload files securely, you can use SFTP (SSH File Transfer Protocol). It works like FTP, but goes over SSH, so the connection is encrypted.

Most modern FTP clients (FileZilla, Cyberduck) support SFTP. Just change the connection type to SFTP and use the same details as for SSH.

We recommend SFTP over FTP whenever possible. It’s more secure and, on modern hosts, usually just as fast.

Useful tips

  • Use SSH keys, not passwords. It’s more secure and more convenient.
  • Don’t store the private key on the web. The private key stays on your computer, never on the server.
  • If you don’t need SSH, don’t enable it. It’s one more access route; if you don’t use it, don’t activate it.
  • Be careful with rm and chmod commands. A mistake can delete important files.
  • Document what you do. If you run maintenance commands, write them down to be able to repeat or undo them.

Common problems

I can’t connect via SSH

Check that SSH is active on your account, that the firewall doesn’t block port 22, and that you use the correct username and password (cPanel’s, not WordPress’s).

Permission denied

The username or password is incorrect, or the SSH key isn’t authorized in cPanel. Verify both points.

I connect but can’t do anything

In shared hosting, the shell is restricted. Some commands aren’t available. It’s normal: it’s a security measure.

WP-CLI doesn’t work

Check that WP-CLI is installed on the hosting. If it isn’t, you can install it yourself or ask support to install it.

The connection is slow

It may be due to distance or server load. If it’s a constant problem, check with support.

Frequently asked questions

Is SSH active on miHosting’s shared hosting?

It depends on the plan. In some it’s active by default, in others it’s enabled on request. If you don’t see it in cPanel, open a ticket.

Is it safe to use SSH on shared hosting?

Yes, as long as you use SSH keys or strong passwords. The connection is encrypted, so no one can intercept it.

Can I be root on shared hosting?

No. Root is for VPS and dedicated servers. On shared you have a restricted shell for security.

Does SSH replace FTP?

For many tasks, yes. SFTP (FTP over SSH) is more secure than FTP and allows the same upload and download operations.

Do I need SSH if I’m not a developer?

Probably not. If you manage your website only from the WordPress or cPanel panel, you don’t need SSH.

Access your hosting like a professional

SSH gives you a level of control over your hosting that the panel doesn’t offer. If you’re a developer or manage websites frequently, it’s an indispensable tool that saves a lot of time.

If you need SSH on your miHosting shared hosting, open a ticket from your client panel and we’ll tell you how to enable it. And if you need full access (being root), our managed VPS give you total control with support from real technicians.