SSH access broken

Hi,
I’va accidentially deleted the directoy /var/empty. Now I am not able to login via SSH anymore.
SSH-Log:

08:51:40 sshd[440]: fatal: Missing privilege separation directory: /var/empty
08:51:47 sshd[457]: fatal: Missing privilege separation directory: /var/empty
08:55:16 sshd[1416]: fatal: Missing privilege separation directory: /var/empty
08:55:27 sshd[1444]: fatal: Missing privilege separation directory: /var/empty
08:55:59 sshd[1536]: fatal: Missing privilege separation directory: /var/empty
08:56:45 sshd[1702]: fatal: Missing privilege separation directory: /var/empty
08:57:07 sshd[15911]: Received signal 15; terminating.

I am connected via OpenVPN and have no direct access to the IPFire box, which is an PCEngines APU, so I am also not able to connect a monitor to it.
I have already enabled/disabled SSH in the web GUI. Is there any way to get SSH access running again?

Best regards

Just had a look. My folder empty is empty :rofl: so just create a new one:

drwx–x–x 2 root root 4096 Aug 30 2018 empty

Aah i thought there is an terminal implementation in the webui, but there’s not. Sorry don’t know how you may create that folder again.

You can’t do this remotely.

You need to use a serial DB9 female to DB9 female null modem cable and an USB-DB9 connector linked together or, more directly, a USB cable with at the other end a female serial port with a null modem pin out, like the one sold by pc engines: https://www.pcengines.ch/usbcom1a.htm. I assume you will not have a serial port on your laptop and therefore there is the need for a usb adapter, otherwise a null modem cable would suffice to connect the two serial ports (APU and PC).

Then you connect the cable/adapter to the USB port of a laptop or desktop and with the other end the APU serial port. After that you run a software terminal emulator set to 115200 baud, 8n1, and you have a direct console access to the shell of IPFire through the serial port using the terminal. Once there, you can repair the file system.

If for whatever reason you can’t repair the file system, do a backup using the web interface and reinstall IPFire. Then you do a restore from the web interface.

1 Like

A null modem cable is highly recommend. Maybe you can unassemble the HDD from the APU an mount it on any linux computer. Then chrooting into it and your done.

@Developers: Maybe a “kill-switch” which reset the whole SSH service from a to z is requiered in case of the brick. I think it would be a nice feature.

Thanks for your replies!
I was afraid that I have no other option than connecting to the APU with a null modem cable. But unfortunately I have to wait until I get to that office again, which is not around the corner… :frowning:
A “reset” function for the SSH service in the web interface would really be helpful.

Thanks again.