🔑
Hosting

Enabling SSH on your hosting and connecting with a key

16.11.2026
← All articles

SSH (Secure Shell) is an encrypted command-line connection to a server. For developers it beats a file manager: installing packages with Composer, running Laravel migrations, managing WordPress with WP-CLI, unpacking large archives or tailing logs are all quick in a terminal. Here's how to check whether your hosting has SSH, create a key and log in with it instead of a password.

SSH access depends on the plan

On shared hosting SSH is not always enabled; many providers offer shell access only on certain plans or on request. In ISPmanager it appears as the user's shell-access permission. sayt.uz customers can check their plan in the sayt.uz cabinet or through support. You'll need the server address, your username (usually the hosting login) and the port — 22 by default, but confirm it in your hosting details.

First connection with a password

ssh -p 22 user123@server.example.uz

Linux and macOS have a terminal built in; Windows 10 and 11 ship an OpenSSH client in PowerShell. On first connect you're shown the server fingerprint; answering yes stores it in ~/.ssh/known_hosts. If it changes later, SSH warns you — don't ignore that, check with support first.

Why a key beats a password

Passwords can be guessed, leaked or phished. A key pair keeps the private key on your machine and puts only the public key on the server; the private key never travels over the network. It also lets scripts and deployments connect without typing a password.

Step 1: generate a key pair

ssh-keygen -t ed25519 -C "work-laptop"

Accept the default path ~/.ssh/id_ed25519 and set a passphrase, so a stolen file is useless. You get id_ed25519 (private, never share it) and id_ed25519.pub (public).

Step 2: add the public key to the server

On Linux and macOS:

ssh-copy-id -i ~/.ssh/id_ed25519.pub -p 22 user123@server.example.uz

On Windows, copy the one-line contents of the .pub file, log in with your password and run:

mkdir -p ~/.ssh
chmod 700 ~/.ssh
echo "ssh-ed25519 AAAA...rest-of-key... work-laptop" >> ~/.ssh/authorized_keys
chmod 600 ~/.ssh/authorized_keys

If the folder or file is writable by others, the SSH server ignores the key for safety. The key must also stay on a single line.

Step 3: test and use an agent

ssh -v -i ~/.ssh/id_ed25519 -p 22 user123@server.example.uz

You should now be asked only for the key passphrase; -v shows which keys are tried if not. Run ssh-add ~/.ssh/id_ed25519 so ssh-agent remembers it for the session (on Windows, enable the OpenSSH Authentication Agent service).

A shortcut in ~/.ssh/config

Host example
    HostName server.example.uz
    User user123
    Port 22
    IdentityFile ~/.ssh/id_ed25519
    ServerAliveInterval 60

Now ssh example is enough, and ServerAliveInterval keeps idle sessions from dropping. The alias also works with scp, rsync and SFTP clients.

Example: deploying a restaurant site

A small Tashkent web studio built a Laravel menu-and-booking site for a restaurant. Updates used to mean FTP uploads and copying vendor by hand, up to half an hour each time. With SSH and per-developer keys, a release became git pull, composer install --no-dev and php artisan migrate --force. When a developer left, removing their line from authorized_keys closed their access without changing a shared password.

Security reminders

If the server still asks for a password or says "Permission denied (publickey)", check permissions and the key line, then contact support with your ssh -v output.

Related articles

📦 Hosting Plan Terms Explained: Disk, Inodes, CPU, RAM and Processes 🛠️ Corrupted MySQL Table: How to Check and Repair It 🧩 Garbled characters on your site: causes and fixes for broken encoding 🛡️ Is your hosting backup enough? The 3-2-1 rule in practice
🌐 Language
🇺🇿 O'zbek 🇺🇿 Ўзбек 🇷🇺 Русский 🇬🇧 English ✓