So I'm running a private subnet where there is no internet connectivity, I understand the grave danger of running an ssh server on the internet without security.

In short I would like to be able to login to another machine on my subnet without entering a password or fumbling with rsa keys. So passwordless, but not passwordless in the traditional sense.

To complicate the matter, I boot over the network, and the mechanism I am using to do so (Warewulf) does not easily allow me to add rsa keys to the root user.

So I am looking for a way to disable all ssh security through the sshd_config and ssh_config files.



Assuming OpenSSH, you can (still, but not by default) use HostbasedAuthentication which is the same (fragile) scheme used by classic rsh/rhost before ssh was invented. Namely, if the client IPaddress maps to a hostname listed in a server system or user config file, the connection is accepted.

This relies on correct and available rDNS for your local/trusted machines, so unless you are a part of a meticulously administered enterprise network, this likely means either: running your own DNS server -- at minimum dnsmasq or similar -- which is authoritative for local and forwards non-local as needed -- which isn't needed if 'private subnet' means you don't connect out at all; or editting your local client machines into the hosts file on every server (at least) and keeping them up to date.

  • It is a bit less fragile, as even HostbasedAuthentication relies on pubkeys – it only uses the client machine's host key for that. – user1686 Jul 15 '15 at 5:55

Obviously, if an attacker manages to get any foothold on the network, they'll be able to move laterally just as easily as you can. But if you understand that and want to accept the risks:

Configure SSH to use PAM (UsePAM yes in /etc/ssh/sshd_config), then put the following in /etc/pam.d/sshd:

auth sufficient pam_permit.so

This will immediately grant access at that point.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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