I installed ARMv7 Raspberry Pi 2 following this instructions on my Raspberry Pi 3. I installed the ARMv7 because ARMv8 would not give me a wlan0 interface.

ARMv7 gave me a wlan0 interface but the sshd service failes. The failing line is:

 Jul 03 05:00:41 alarmpi sshd[406]: key_load_private: memory allocation failed

I have no swap space but I should not need it because the only thing running is OpenSSH and emacs. This is a fresh install. I did pacman -Syu immediately.

Any help is much appriciated. Let me know if I need to offer more info.

  • Just had the same thing happen to me using Arch. Raspberry Pi 3. It might be a problem with the current version. Jul 16, 2017 at 19:25

1 Answer 1


I had the same issue. I found that the ssh host keys are empty files, which probably causes sshd to try and allocate huge amounts of memory.

The fix in my case was simple, delete the host files:

$ rm /etc/ssh/ssh_host*key*

Then start the service (it will recreate these host keys automatically):

$ systemctl start sshd

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.