Blog

SSH access for a hosting account: keys, SFTP and a shell you can switch on safely

How to add an SSH key to a hosting account, generate a key pair, turn SFTP on, and ask for a shell that an administrator approves, with the steps and checks.

SSH access for a hosting account: keys, SFTP and a shell you can switch on safely

2026-11-22

Every hosting account in AI Hosting Panel can receive SSH keys. A key lets a person or a tool log in without a password: a deploy script, Claude Code, or your own computer. This guide shows the SSH card on the Accounts page, step by step.

Three levels of access

By default an account has no shell and SFTP is off. You can turn on SFTP: the account then uploads and downloads files over SFTP, locked into its home folder and starting in public_html. A shell is a separate step: the account asks for it, and an administrator approves it on the Approvals page. Only then can the account run commands over SSH, in its own home folder.

Open the SSH card

  1. Open Hosting, then Accounts.
  2. On the row of the account, press SSH.
  3. The card shows the shell state, the SFTP state and the keys already added.
SSH access card for a hosting account in AI Hosting Panel, with shell and SFTP state and the key list
The SSH card: the shell state, the SFTP button, the key list and the box to add a key.

Add your own public key

  1. On your computer, create a key pair with ssh-keygen -t ed25519. Keep the private key on your computer, and copy the public key (the .pub file).
  2. Paste the one line of the public key into Public key, starting with ssh-ed25519, ssh-rsa or ecdsa-sha2.
  3. Press Add key. The key appears in the list with its fingerprint.
Adding a public key in the SSH card of a hosting account
Paste one public key, without options, and press Add key.

Or generate a key pair on the server

Press Generate a key pair. The panel makes a new ed25519 key pair, adds the public half to the account, and shows the private key once. Save the private key at once, in a file that only you can read. The server does not keep a copy, so a lost private key cannot be shown again: generate a new pair and remove the old key.

Turn SFTP on

The Turn SFTP on button in the card switches SFTP on; once it is on, the button reads Turn SFTP off. When SFTP is on, the account can log in over SFTP with its key. Upload a file to check it: the file should appear in public_html. The button is disabled while the shell is on, because a shell cannot run inside the SFTP lock.

Ask for a shell

  1. Press Ask to turn the shell on in the SSH card.
  2. Open Approvals in the sidebar. The request shows as set_ssh_shell, with the account's ID in its arguments.
  3. An administrator presses Approve. Only then does the account get a login shell, and its home folder becomes its own.
Approvals page showing an applied set_ssh_shell request for one account
After approval the request shows as applied. Until then it waits on the Approvals page, with Approve and Reject buttons.

Test the login

  1. From your computer, run ssh -i your-private-key account-name@your-server-address.
  2. With the shell on, you see a prompt in the account's home folder. With the shell off, the login is refused, and only SFTP works.
  3. Remove a key that you no longer use: press Remove next to it. Anything that logs in with that key stops working at once.

Good practice

Give each person or tool its own key, so that one can be removed without affecting the others. Keep the shell off unless a task needs it. Remove keys when a person leaves or a tool is retired. The audit log records every key added, generated or removed, and every shell change.

All posts