Sometimes it’s useful to have incredibly insecure SSH on a machine, such that it allows logging in as root without a password. It’s pretty self explanatory that you shouldn’t enable this on a box connected to an unsecured network, but just to be clear;
Now that we’ve got that out of the way, let’s get onto configuring this thing!
It’s pretty straightforward to get this set up;
passwd -d root
rootlogin and logging in without a password.
/etc/ssh/sshd_configand change these options;
PermitRootLogin yes PermitEmptyPasswords yes
The special sauce: Mark
sshas a “secure TTY”.
sshto the end;
This step is the not-so-obvious one, and the reason I wrote this post in the first place!
You’re done! You can now SSH into your box as
rootwithout a password;
$ ssh firstname.lastname@example.org $ id uid=0(root) gid=0(root) groups=0(root)
Source: Super User