Shell & Drush — Cheat Sheet
Your account comes with a real command line — a limited shell fenced to your own space, no root and nothing to install. This page is the quick primer: how to get in, run Drush, choose the PHP your tools use, move a site around, and hand a developer their own login. Everything here links to the full story.
The essentials in 30 seconds
- Two logins per account —
oNonly browses files;oN.ftpdoes all the real work (Drush, Composer, PHP switching). When in doubt, use.ftp. → Drush basics - Three ways in, one account — an SSH shell, SFTP, and (where your host
offers it) FTPS, all on the same
oN.ftplogin. → Shell, SFTP & FTPS - Two Drush families —
drush, the system-wide Drush 8, for Drupal 6/7;vdrush, each site's own bundled Drush, for Drupal 8+. → Drush basics - Your CLI PHP is yours — the PHP your Drush and Composer run under is a plain file you set, independent of the version serving the live site. → Drush basics
- Extra developer logins — hand out sub-accounts, each fenced to your own sites. → Developer sub-accounts
Open a shell (and move files)
ssh [email protected] # port 22
Same account, same credentials, three protocols: the shell above, SFTP for
file transfer (host = your server, port 22, user oN.ftp), and — where your
host has switched it on — FTPS ("FTP with explicit TLS", port 21). Plain,
unencrypted FTP is always refused.
→ Connecting: shell, SFTP & FTPS
Log in without a password
Make a key on your own computer, then install its public half by hand —
ssh-copy-id doesn't work through the limited shell:
ssh-keygen -t ed25519 -C "you@your-computer"
# paste ~/.ssh/id_ed25519.pub into ~/.ssh/authorized_keys (one key per line)
If key logins ever stop working, it's almost always permissions:
chmod 700 ~/.ssh && chmod 600 ~/.ssh/authorized_keys
Run Drush: drush and vdrush
Legacy Drupal 6/7 sites use the system Drush 8, plain drush, with a
dotted alias:
drush @example.com status # also: cc all · updb · uli
drush aliases # list your alias names — never type one from memory
Modern Drupal 8+ sites use each site's own bundled Drush, vdrush, with a
hyphenated alias (dots become hyphens, except the one before the final
extension: @sub.example.com → @sub-example.com). Run it from the platform's
app root — the folder with vendor/ — as oN.ftp, and always name the @alias:
vdrush @sub-example.com cr # also: updb · uli
drush11 aliases # print modern alias names to copy
First time on a platform, unlock its local Drush once with the Unlock Local
Drush task in the Ægir control panel, then run vdrush --version to confirm.
A Verify, clone, or upgrade re-locks it — just run the task again.
→ Drush basics · Aliases & contrib commands
Pick your CLI PHP version
The PHP your command-line tools use is independent of the live site's. Set a lasting default:
echo 8.3 > ~/static/control/cli.info # picked up within a few minutes
Or flip it instantly for your next command — the filename is the switch, highest version wins:
touch ~/static/control/php83.info # drop back with: rm ~/static/control/php83.info
Only the PHP versions your host keeps installed are available; if one you want is missing, open a support request. → Drush basics · the live site's PHP version
Export a site: dump it, or pull it home
One line, no interactive login, straight into a local file:
ssh [email protected] 'drush @example.com sql-dump' > dump.sql
(Modern site: drush11 and the hyphenated alias.) To pull a whole site down,
rsync — and the -L is non-negotiable, because the paths under
~/clients and ~/platforms are symlink farms; without it you drag home a bag
of shortcuts:
rsync -avzuL [email protected]:clients/myclient/example.com ./
Connect a database tool over SSH
Sequel Ace, Workbench, TablePlus and friends reach your database through an SSH tunnel — nothing is exposed to the internet:
- SSH: host = your server, user
oN.ftp, port 22 - MySQL: host
127.0.0.1, port3306, with the site's own DB user, password and name
Give a developer their own login
Each extra login is one file under ~/users/. To rotate a developer's
password, delete their file — it's rebuilt with a fresh one within about three
minutes:
rm ~/users/o1.acmecorp
That's a full rebuild of their home directory (any SSH key they added is wiped, so they re-add it) — your sites are untouched. → Developer sub-accounts
Fetch private code with a deploy key
Public code clones straight from the shell:
git clone https://github.com/you/mysite.git mysite
For a private repository that Ægir fetches for you (a makefile build, say), those fetches run as your instance's own system user, not your login — so register its key. The readable copy is:
~/static/o1.id_ed25519.pub # add its contents as a read-only deploy key
It's a modern ed25519 key; any old RSA USER.id_rsa.pub deploy key is
stale. → Building a platform
The files most people touch
| File | What it does | Default |
|---|---|---|
~/.ssh/authorized_keys |
Your public key(s) for passwordless login — one per line | (empty) |
~/static/control/cli.info |
Lasting default PHP version for Drush & Composer | (BOA default) |
~/static/control/phpNN.info |
Instant CLI PHP switch — filename is the switch, highest wins | (none) |
~/users/<name> |
One file per extra login — rm it to force a fresh password |
(auto) |
Four files, one shell, three ways in — that's most of the surface you'll ever
touch. There's no list of commands to memorise, either: the limited shell
allows a curated set and prints it on demand — type ? or help at the
prompt. What's in it depends on what your host has enabled (for example scp
appears only when Node.js is switched on).
→ The full command list ·
quick lookup reference
If something's weird
- Contrib Drush commands "don't exist," or Drush misbehaves → you're on
bare
oN, notoN.ftp; core works but contributed commands are deliberately not loaded on the wrong login. Which login, and why. vdrushwon't run → you must be at the platform's app root, name the@alias, and have run Unlock Local Drush (it re-locks on every Verify or upgrade). The preconditions.- Key logins suddenly refused → check
~/.sshis700andauthorized_keysis600; and remember every account still gets a 90-day password refresh even with a key. Connection problems.
Going deeper
- Everything about connecting: Shell, SFTP & FTPS — the full allowed-command list, SSH keys, the database tunnel, the 90-day reset.
- Drush in depth: Drush basics and aliases & contrib commands.
- Deploying code:
Building a platform
(git & deploy keys) and
developing your site (the
.dev.URL, Twig, Sass/Compass). - Moving a site out: Exporting your site.