Tip of the Trade: Easy and Secure Remote Editing
January 15, 2007
Using ssh for remote administration on Linux systems is easy and secure. But if you have multiple files to edit, it can get a bit cumbersome juggling multiple terminals. If you have a lot of files to edit, or large complex files, you can tunnel X Windows over ssh and use graphical file managers and editors. But this still isn't ideal, because it lags over slow connections. So there is a third option that gives you both the environment of your choice and speed: sshfs.
Check for kernel support by looking in your /boot/config-[version] file. You want to see "CONFIG_FUSE_FS=m". If it says "# CONFIG_FUSE_FS is not set" then you need to rebuild your kernel. It's unlikely you'll have to do this, since it's standard in most Linux distributions.
After installing sshfs and fuse-utils, follow these steps:
$ sshfs hostname:/remotedir localdir/hostname:/remotedir is the hostname of your remote PC and the directory you want to mount, and localdir is your local mountpoint. You must have permissions to use both directories, and you need an account on the remote PC. sshfs will authenticate you just like any ssh login. When you're finished, unmount with the fusermount -u localdir/ command. For more information, visit fuse.sourceforge.net.