If you have your home directory on another machine, it’s common to use NFS to access it. NFS is easy to setup and works more or less out of the box on Linux. However, NFS is not secure and you need to have a carefully setup firewall in order to use it safely.
SSHFS is a more secure alternative, but it’s quite tricky to setup on the client side. It’s very easy to setup on the server though, you just need an SSH server with SFTP support.
This is the way to setup it on the client using Ubuntu desktop 10.04:
- First you have to get rid of the file
.ICEauthorityfrom your home directory. Create a.gnomercfile in your home directory:mkdir "/tmp/.ICE-${USER}" export ICEAUTHORITY="/tmp/.ICE-${USER}/.ICEauthority" -
Then you need to setup a local bootstrap home directory containing this
.gnomercfile and your.sshdirectory including your private key file. The remote home directory will be mounted over this. This can be on a read-only filesystem. You need to modify your.ssh/configfile to explicitly point out your private key and known hosts files, add this:IdentityFile /home/username/.ssh/identity IdentityFile /home/username/.ssh/id_rsa IdentityFile /home/username/.ssh/id_dsa UserKnownHostsFile /home/username/.ssh/known_hosts
-
Setup mounting on login by adding this to
/etc/gdm/PostLogin/Default:sshfs -F ${HOME}/.ssh/config -o nonempty -o allow_other -o default_permissions ${USER}@theserver: ${HOME} -
Setup umounting on logout by adding this to
/etc/gdm/PostSession/Defaultfusermount -u -z ${HOME}
Intressant! Ska testa så fort jag får chansen!
Mats
Very interesting! Will test as soon as I am presented with the opportunity!