Skip to content

About

Script for installing and enabling SSH server on the Flashforge Adventurer 3 3D printer

Resources

Stars

1 star

Watchers

2 watching

Forks

Latest commit

 

History

14 Commits

Folders and files

Repository files navigation

SSH server installer for the Flashforge Adventurer 3

Installs and enables the OpenSSH server on a Flashforge Adventurer 3 from a USB stick, and adds boot options for running Klipper on another computer.

Install

  1. Format a USB stick as FAT32 and copy the contents of usb_stick/ to it.
  2. Replace files/root/.ssh/authorized_keys on the stick with your public key. Without a valid key the installer refuses to start and changes nothing.
  3. With the printer off, insert the stick and power on.
  4. Wait for the end screen, then power off, remove the stick and power on.
  5. Log in as root over SSH with your key.
Installing Installed Stopped
Installing Installed Stopped

If a step or check fails, the installer stops and shows "Stopped" until you power off. Changes made before the failure are not undone.

Each run writes install-log.txt to the stick, with every step and check. If the stick is not writable, the log goes to /tmp/ffa3-install-log.txt on the printer and is lost on reboot.

On a reinstall, opkg may report resolve_conffiles errors and leave /etc/ssh/sshd_config-opkg and /etc/config/socat-opkg. These are harmless and can be deleted.

What it installs

Packages (usb_stick/packages/):

Package Purpose
openssh-server, openssh-keygen, libopenssl SSH server
uclient-fetch, libuclient wget, so opkg can download packages
socat, coreutils-nohup Serial port forwarding for /opt/KLIPPER

Files (usb_stick/files/):

File Purpose
/root/.ssh/authorized_keys Your public key
/etc/init.d/sshd sshd start script; also creates ECDSA and Ed25519 host keys
/etc/ssh/sshd_config Package default sshd configuration
/opt/auto_run.sh Flashforge boot script, with the boot options below

usb_stick/scripts/01-fix-permissions.sh then sets the owners and modes that sshd requires, since files from a FAT32 stick all get the same mode.

Boot options

Create one of these files on the printer:

  • /opt/DONT_START_SOFTWARE: skip the Flashforge software on the next boot only. The file is removed at boot.
  • /opt/KLIPPER: instead of the Flashforge software, forward the controller's serial port to TCP port 5038 with socat, so Klipper can run on another computer. The port accepts connections from any network the printer is on, including its Wi-Fi access point, without authentication.

Development

See INSTALLER_DEVELOPMENT.md for the behaviour, exit codes and tests, and docs/DESIGN.md for planned changes.

About

Script for installing and enabling SSH server on the Flashforge Adventurer 3 3D printer

Resources

Stars

1 star

Watchers

2 watching

Forks

Releases

Packages

Contributors

Languages