10.7.2. NFS Access Problems
Another problem that can arise with SSH and NFS is one of access
rights. With the public-key or trusted-host methods, if the per-user
control files are in the usual place, sshd must
read the target account's home directory in order to perform
authentication. When that directory is on the same machine as
sshd, this isn't a problem.
sshd runs as root, and therefore has access to all
files. However, if the directory is mounted from elsewhere via NFS,
sshd might not have access to the directory. NFS
is commonly configured so the special access privileges accorded the
root account don't extend to remote filesystems.
Now, this isn't a truly serious restriction. Since one of the
root privileges is the ability to create a process with any uid, root
can simply "become" the right user, and access the remote
directory. SSH1 and SSH2 use this mechanism, but OpenSSH
doesn't currently have it. [Section 3.6, "As-User Access (userfile)"]
You can work around the problem, but to do so you must make your
authorized_keys file world-readable; the only
way to let root read it remotely is to let everyone read it. This
isn't too objectionable. The
authorized_keys file contains no secrets; though
you might prefer not to reveal which keys allow access to your
account, thus advertising which keys to steal. However, to grant this
access, you must make your home directory and
~/.ssh world-searchable (that is, permissions at
least 711). This doesn't allow other users to steal the
contents, but it does allow them to guess at filenames and have those
guesses verified. It also means that you must be careful about
permissions on your files, since the top-level permissions on your
directory don't prevent access by others.
All this may be entirely unacceptable or no problem at all; it
depends on your attitude towards your files and the other users on
the machines where your home directory is accessible.