Skip to content

Instantly share code, notes, and snippets.

@przemoc
Created March 24, 2017 12:00
Show Gist options
  • Save przemoc/39e3d818e430c7710af604f652c6ad2a to your computer and use it in GitHub Desktop.
Save przemoc/39e3d818e430c7710af604f652c6ad2a to your computer and use it in GitHub Desktop.
ssh root without password on FreeBSD.

ssh root without password on FreeBSD

If you have some toy boards in your internal network, then you can happily live without password and key. As I learned today, setting following stuff in /etc/ssh/sshd_config is not enough:

PermitRootLogin yes
PermitEmptyPasswords yes

You have to edit /etc/pam.d/sshd too and append to pam_unix.so module in auth facility nullok argument. The line will look like:

auth            required        pam_unix.so             no_warn try_first_pass nullok
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment