Connect to your server via SSH

From Acenet Knowledgebase
Revision as of 14:21, 27 October 2026 by Docs admin (talk | contribs) (Rewritten for current Acenet services (Main Page refresh))
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

SSH gives you a secure command line on your server, so you can run commands, edit files and install software. This guide covers connecting from Windows, Mac and Ubuntu Desktop. All three include an SSH program, so you don't need to install anything.

In the examples below, replace 203.0.113.10 with your server's IP address or hostname, and root with the user you log in as.

What you need

  • Cloud server or dedicated server: your server's IP address, which is shown on the server's page in the Client Area, and the root password or an SSH key. If you don't have the root password, a cloud server's Reset Root Password button sets a new one. See Manage your cloud server.
  • cPanel account (shared or reseller hosting): your cPanel username, your server's hostname and an SSH key. Our shared servers accept SSH keys only, not passwords, and SSH must be turned on for your account. If it isn't, please open a support ticket. To add your key, see Log in with an SSH key below.

SSH uses port 22 unless your server has been set up with a different port. In that case, add -p and the port number to the commands below, for example ssh -p 2222 [email protected].

Open a terminal

  • Windows 10 and 11: right-click the Start button and choose Terminal (or Windows PowerShell).
  • Mac: open Terminal from Applications > Utilities, or search for "Terminal" with Spotlight (Command + Space).
  • Ubuntu Desktop: press Ctrl + Alt + T, or search for "Terminal" in Activities.

Connect

Type this command and press Enter:

ssh [email protected]

The first time you connect, SSH shows the server's fingerprint and asks whether to continue. Type yes and press Enter. SSH remembers the server, so it only asks once. If it ever warns that the server's identification has changed when you haven't reinstalled the server, don't continue, and open a support ticket.

Enter your password when asked. Nothing appears on screen while you type it; that's normal. You're now logged in. Type exit to disconnect.

Log in with an SSH key

An SSH key is safer than a password and saves you typing it. You create a pair of keys on your computer: a private key, which never leaves your computer, and a public key, which you put on the server.

1. Create the key (the same command works on Windows, Mac and Ubuntu). Press Enter to accept the default file name, and choose a passphrase to protect the key:

ssh-keygen -t ed25519

2. Add the public key to your server:

  • Mac and Ubuntu:
ssh-copy-id [email protected]
  • Windows (PowerShell):
type $env:USERPROFILE\.ssh\id_ed25519.pub | ssh [email protected] "mkdir -p ~/.ssh && chmod 700 ~/.ssh && cat >> ~/.ssh/authorized_keys && chmod 600 ~/.ssh/authorized_keys"
  • cPanel account: show the public key with cat ~/.ssh/id_ed25519.pub (on Windows, type $env:USERPROFILE\.ssh\id_ed25519.pub) and copy it. In cPanel, go to Security > SSH Access > Manage SSH Keys > Import Key, paste it into the public key box, and click Import. Then click Manage next to the key, and Authorize.

3. Connect as before. SSH now uses your key instead of asking for the server's password:

ssh [email protected]

Once key login works on your own server, you can turn off password logins for extra security. See Secure your cPanel server.

Copy files over SSH

The same connection can copy files. From your computer's terminal:

scp myfile.zip [email protected]:/root/
scp [email protected]:/root/backup.tar.gz .

For a graphical program, FileZilla and WinSCP (Windows), or Cyberduck (Mac), connect using SFTP with the same details. See Upload files to your website.

If you can't connect

  • Connection timed out: check the IP address and port. Your IP address may also be blocked after too many failed logins.
  • Permission denied: check the username and password or key. On a cPanel account, make sure the key is authorized in Manage SSH Keys.
  • For both, and for mistakes in the server's SSH or firewall settings, see Locked out of your server.