Tips and Tricks
This page contains solutions for problems that users have run into and which they wanted to share with others to save them time.
Did you resolve an issue that may be interesting for others? Please tell us what you did and how you did it!
Mount a directory from the file server on a machine in Guestnet
Directories residing on the file server (like /project or /user) cannot be accessed via the NFS protocol from machines in the Guestnet, such as laptops and self-maintained servers. It would be a security risk if it were possible. However, it is possible to mount such file systems via sshfs.
How to enable sshfs to mount and interact with directories and files located on a remote server. The access to the remote file system takes place via SFTP. The steps are to setup the client on your linux desktop are the following:
1) modify /etc/fstab (as root) adding the line below
# # Here: # kyll.nikhef.nl : hostname of the server # scifi : remote user who will authenticate on server # /project/scifi : remote file system # /mnt/scifi : local mount point # email@example.com:/project/scifi /mnt/scifi fuse.sshfs defaults,allow_other 0 0
2) create a key based ssh setup to authenticate on the server
(usual ssh-keygen + ssh-copy-id + ssh-add sequence)
See for example this link
3) allow other local users access to remote file system creating a
# # allow non-root users to specify the allow_other or allow_root mount options # user_allow_other
In this example the authentication takes place via the generic user 'scifi', which limits the choice of the hosts that can act as remote servers. A better implementation would be to choose a more reliable server like a login server or a virtual machine with "infinite" uptime.