Add ability to use SSH and Telnet

This commit is contained in:
2026-10-01 12:53:31 +03:00
parent cc8a92eb00
commit b3bbf8c5aa
8 changed files with 46 additions and 0 deletions
+4
View File
@@ -38,4 +38,8 @@ Choose `nwipe` from the startup menu to use its interactive interface. Its PDF c
To brand certificates, place your JPEG logo at `config/includes.chroot/etc/nwipe/logo.jpg` before building. Nwipe is built from upstream v0.42, which supports this `logo.jpg` branding file. You can also include `/etc/nwipe/nwipe.conf` in `config/includes.chroot` to ship default certificate settings. To brand certificates, place your JPEG logo at `config/includes.chroot/etc/nwipe/logo.jpg` before building. Nwipe is built from upstream v0.42, which supports this `logo.jpg` branding file. You can also include `/etc/nwipe/nwipe.conf` in `config/includes.chroot` to ship default certificate settings.
NetworkManager provides network connectivity; wired Ethernet uses DHCP automatically, and Wi-Fi can be configured with `nmcli device wifi list` followed by `nmcli device wifi connect "SSID" --ask`. The image starts SSH and Telnet servers for the `eraser` account with password `eperaser`; root SSH login is disabled. The account can run only the EP Eraser and nwipe programs through passwordless `sudo`, for example `sudo -n /usr/local/sbin/ep-eraser` or `sudo -n /usr/local/bin/nwipe`.
Telnet sends both passwords and commands without encryption. Use it only on an isolated, trusted internal network; anyone able to monitor that network can capture the credentials. The predefined password is shared by every image built from this configuration, so change it in `config/includes.chroot/usr/local/sbin/ep-eraser-remote-setup` before deploying outside a controlled test environment. Connect with `ssh -t eraser@HOST` or `telnet HOST`.
This project intentionally does not include an automatic wipe-all mode. This project intentionally does not include an automatic wipe-all mode.
@@ -0,0 +1,8 @@
#!/bin/sh
set -eu
chmod 0755 /usr/local/sbin/ep-eraser-remote-setup
chmod 0440 /etc/sudoers.d/ep-eraser
visudo --check --file=/etc/sudoers
sshd -t
systemctl enable ep-eraser-remote-access.service ssh.service openbsd-inetd.service
+1
View File
@@ -0,0 +1 @@
telnet stream tcp nowait root /usr/sbin/tcpd /usr/sbin/in.telnetd
@@ -0,0 +1,5 @@
PermitRootLogin no
PasswordAuthentication yes
KbdInteractiveAuthentication no
PermitEmptyPasswords no
AllowUsers eraser
@@ -0,0 +1 @@
eraser ALL=(root) NOPASSWD: /usr/local/sbin/ep-eraser, /usr/local/bin/nwipe
@@ -0,0 +1,13 @@
[Unit]
Description=Configure EP Eraser remote login
Requires=live-config.service
After=live-config.service
Before=ssh.service openbsd-inetd.service
[Service]
Type=oneshot
ExecStart=/usr/local/sbin/ep-eraser-remote-setup
RemainAfterExit=yes
[Install]
WantedBy=multi-user.target
@@ -0,0 +1,4 @@
#!/bin/sh
set -eu
printf '%s\n' 'eraser:eperaser' | chpasswd
@@ -1,11 +1,21 @@
bash bash
coreutils coreutils
hdparm hdparm
inetutils-telnet
inetutils-telnetd
iproute2
libconfig11 libconfig11
libncurses6 libncurses6
libparted2t64 libparted2t64
network-manager
nvme-cli nvme-cli
openssh-client
openssh-server
openbsd-inetd
parted parted
smartmontools smartmontools
sudo
util-linux util-linux
wireless-regdb
wpasupplicant
whiptail whiptail