rescueshell Start trial

Install on a host without OpenSSH

Routers, NAS boxes and small Linux images often ship Dropbear, or no SSH server at all. The agent still installs and connects, but no shell opens until the device runs the OpenSSH server.

Why it needs OpenSSH

A shell is a session on the device's own SSH server. For each session the agent writes a one-time key that only that session can use, and OpenSSH reads it through its AuthorizedKeysCommand setting. Dropbear has no such setting, so it cannot be used. We do not fall back to passwords or to any other way in: the device still trusts only the keys and accounts you named when you installed.

See what the device has

Run this on the device, as root:

command -v sshd dropbear
ps | grep -E 'sshd|dropbear' | grep -v grep

The installer checks the same things and prints what it found and what to run when it ends. It never installs packages for you, and it still installs the agent, so you can run it first and use what it prints.

OpenWrt

OpenWrt ships Dropbear on port 22. Move it, install OpenSSH, then start it. If you are logged in over SSH, run this from the serial console or a second session you can reopen: restarting Dropbear can drop the one you are in. The whole path for a router behind CGNAT is in the OpenWrt guide.

uci set dropbear.@dropbear[0].Port='2222'
uci commit dropbear
/etc/init.d/dropbear restart
opkg update
opkg install openssh-server openssh-keygen curl ca-bundle openssl-util
/etc/init.d/sshd enable
/etc/init.d/sshd start

Alpine and BusyBox images

On Alpine, with OpenRC:

apk add openssh openssl curl ca-certificates
rc-update add sshd default
rc-service sshd start

If Dropbear runs there, stop it or move it off port 22 first:

rc-service dropbear stop
rc-update del dropbear

To keep it, set DROPBEAR_OPTS="-p 2222" in /etc/conf.d/dropbear and run rc-service dropbear restart instead.

A BusyBox image with no package manager has to get OpenSSH in at build time. The Buildroot guide covers that, and the init script and read-only root that go with it. More on Alpine in the Alpine guide.

Debian and Ubuntu

apt-get install -y openssh-server
systemctl enable --now ssh

On Fedora and RHEL the packages and service are dnf install -y openssh-server and systemctl enable --now sshd. See the Debian and Ubuntu guide for what the installer sets up.

NAS boxes

Most NAS systems have an SSH switch in their admin pages that starts a built-in server. Turn it on and run the check above. If it is OpenSSH, the installer works as it does anywhere else. If it is Dropbear, or the system will not let you add packages, you cannot use it today. We have not tested NAS firmware. Two things to expect on the ones that do work:

Then install, or run the installer again

Create a token in the dashboard, then run this as root:

curl -fsSL https://releases.rescueshell.com/latest/install.sh | sh -s -- \
  --base-url https://releases.rescueshell.com/latest --relay https://app.rescueshell.com \
  --name pump-07 --trust-keys-from pi

Change pi to the account you log in as. See add a device for the other options. A device you already installed needs the same command again: it adds the sshd lines and reloads sshd.

When it works, the installer prints no ssh server: lines, and a shell opens from the device's page. If it does not, see the shell does not open.