User Tools

Site Tools


ssh

SSH

Root SSH is not enabled on a stock unit. Root login is closed in the stock sshd_config, and there is no published default password. There are two ways in:

  1. A PROXdongl3 with a [TestMode] EEPROM payload and a FAT USB stick.
  2. An autorun script on the internal init SD card.

The USB route is the easiest. Format your USB stick FAT32 (MBR) and copy your authorized_keys file and the following autorun.sh script to its root:

#!/bin/sh
HERE=$(cd "$(dirname "$0")" && pwd)
mount -o remount,rw /
 
[ -f /etc/ssh/sshd_config.stock ] || cp /etc/ssh/sshd_config /etc/ssh/sshd_config.stock
 
{
  echo "Port 22"
  echo "PermitRootLogin yes"
  echo "PubkeyAuthentication yes"
  echo "AuthorizedKeysFile .ssh/authorized_keys"
  echo "Subsystem sftp internal-sftp"
} > /etc/ssh/sshd_config
 
mkdir -p /root/.ssh
cat "$HERE/authorized_keys" > /root/.ssh/authorized_keys
chmod 0700 /root/.ssh
chmod 0600 /root/.ssh/authorized_keys
systemctl enable sshd.socket
systemctl restart sshd.socket
mount -o remount,ro /

The stock config is saved as /etc/ssh/sshd_config.stock. To return a unit to stock, restore that file, remove /root/.ssh/authorized_keys, disable sshd.socket, and remount / read-only.

A make_dongle.py script is available that can help construct a USB stick.

Copying files

The device has an old OpenSSH. Use legacy scp mode:

scp -O file root@<unit-ip>:/tmp/
ssh.txt · Last modified: by doof