Limits of This Technique

Per-account configuration can do many interesting things, but it has some restrictions that we will discuss:

Per-account configuration (highlighted parts)

Figure 8-1. Per-account configuration (highlighted parts)

  • It can’t defeat security measures put in place by compile-time or serverwide configuration. (Thank goodness.)

  • It is most flexible and secure if you use public-key authentication. Hostbased and password authentication provide a much narrower range of options.

8.1.1 Overriding Serverwide Settings

SSH settings in a user’s account may only restrict the authentication of incoming connections. They can’t enable any SSH features that have been turned off more globally, and they can’t permit a forbidden user or host to authenticate. For example, if your SSH server rejects all connections from the domain evil.org, you can’t override this restriction within your account by per-account configuration.[118]

This limitation makes sense. No end-user tool should be able to violate a server security policy. However, end users should be (and are) allowed to restrict incoming connections to their accounts.

A few features of the server may be overridden by per-account configuration. The most notable one is the server’s idle timeout, which may be extended beyond the serverwide setting. But such features can’t coerce the server to accept a connection it has been globally configured to reject.

If you are an end user, and per-account configuration doesn’t provide enough flexibility, you can run your own instance of the SSH server, which you may configure to your heart’s content. [5.1.2] Be cautious, though, since this is seldom the right thing to do. The restrictions you’re trying to circumvent are part of the security policy defined for the machine by its administrators, and you shouldn’t run a program that flouts this policy just because you can. If the machine in question is under your administrative control, simply configure the main SSH server as you wish. If not, then installing and running your own sshd might violate your usage agreement and/or certainly annoy your sysadmin. And that’s never a wise thing to do.

8.1.2 Authentication Issues

To make the best use of per-account configuration, use public-key authentication. Password authentication is too limited, since the only way to control access is with the password itself. Hostbased authentication permits a small amount of flexibility, but not nearly as much as public-key authentication.

If you’re still stuck in the password-authentication dark ages, let this be another reason to switch to public keys. Even though passwords and public-key passphrases might seem similar (you type a secret word, and voilà, you’re logged in), public keys are far more flexible for permitting or denying access to your account. Read on and learn how.



[118] There is one exception to this rule: hostbased authentication. A user’s ~/.shosts file may override a restriction placed by the system administrator in /etc/shosts.equiv. [8.3]

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.191.157.186