Your first hour on ShadowShells

Everything below works on this box, as it is configured today. If a command here does not do what it says, that is a bug in the guide — tell staff.

Connecting

ssh yourname@shell.shadowsquad.org

Port 22, no VPN, nothing unusual. On Windows use the built-in OpenSSH client in a terminal, or PuTTY if you prefer.

Root login is disabled and password authentication is deliberately kept on a short leash: add an SSH key from the SSH keys page and use that instead. Keys are installed on the box within a minute of being added.

What the login banner is telling you

Every login prints a short summary. The line worth reading is this one:

Plan: Basic     fg: 1/2   bg: 3/5   disk: 210MB/500MB
fg
Foreground processes in use, and your plan's ceiling. A foreground process is one attached to a terminal you are logged into — including the shell you are typing in right now.
bg
Background processes: anything detached from your login terminal. Your bots, your bouncer, and everything inside screen or tmux count here.
disk
How much of your home directory allowance you have used.

The banner is rendered once a minute, so it is a snapshot, not a live meter. For the live numbers, run usage.

Three commands worth knowing on day one

usage
Your memory, processes and disk right now, counted by exactly the same rules the system enforces.
rules
The short version of the acceptable use policy. It is seven lines. Read it once.
ports
Explains how incoming ports work here, and where to request one.

Your limits, and what happens at them

Each plan sets a ceiling on foreground processes, background processes and memory. The ceilings are enforced by the system, not by hand:

  • Memory is a hard cgroup limit. Exceed it and the kernel kills the process that asked for the memory. There is no swap for user processes, so this is immediate rather than gradual.
  • Process counts are checked once a minute. Going over gets you a warning at your next login first; if you are still over on the following pass, the newest offending job is stopped — never the oldest, because that is usually the bot you care about.

Session infrastructure — the systemd user manager, the session's own sshd process, dbus — is not counted against you. Your login shell is.

Passwords and two-factor

Set or change your shell password from the SSH keys page; the change is applied on the box within a minute. Two-factor authentication for the website lives under Security, and is mandatory for any account with staff permissions.

Incoming ports

You cannot pick your own listening port. Request one from the control panel and the system assigns a free port from its range and opens the firewall for it. Everything else is closed — a service bound to a port you were not given will start happily and be unreachable from the internet, which is a confusing five minutes if you did not know the rule.

Scheduled jobs

crontab -e works and your jobs survive reboots. One caveat specific to this box: there is no mail server here, so cron cannot email you its output. Redirect it somewhere you will look:

*/10 * * * * $HOME/bin/check-bot.sh >> $HOME/logs/check-bot.log 2>&1

A cron job that starts a long-running process counts against your background allowance like anything else.

Editing files

nano if you want to get on with your life — the shortcuts are printed at the bottom of the screen, and Ctrl-O saves, Ctrl-X exits. vim if you already know it, or want to learn: vimtutor is installed and takes about half an hour.

Where to go next

« All guides