From Klaus' wiki
Revision as of 19:43, 6 March 2011 by Klaus (Talk | contribs)

Jump to: navigation, search

SSHFS is a filesystem, that works over a SSH tunnel.

In order to mount a remote file system (e.g. from your development host) on your local account on the main host (bren) issue these commands:

$ ssh-copy-id -i ~/.ssh/ username@host
$ mkdir <-p> <mountpoint>
$ sshfs <username>@<hostip>:/home <mountpoint>

where the ssh-copy-id copies your public ssh-key to the remote host and where ~/.ssh/ is where your ssh keys resides. If there are no you should generate a pair of keys:

$ ssh-keygen

just hit enter to all prompts.

Then you shall create the mountpoint - that is the directory on where you will mount the remote filesystem. The -p creates all directories if they do not exists.

Finally issue the sshfs command to mount the remote file system on the mountpoint.

Tftp booting at home directly from your development host

Now the filesystem on the remote development host is available on your primary host (bren).

Since bren is accessible from the outer world through port 2222 with ssh you can mount your sshfs mounted share on bren on your home computer.

Home computer/tftpboot -- sshfs --> bren/your share -- sshfs --> development host/ /home/emb/uClinux-dist/images 

and your EA board can boot directly from your development host, provided you install a tftp server on your local machine and let it share from /tftpboot. Remember to set up the EA board to work in your local network.


First follow the instructions above and mount the disk on your development host on a directory in your home directory.

The uid and gid's mentioned below may vary on your computer. Check locally in /etc/passwd and /etc/group your uid and gid.

local host$ sshfs -o uid=500 -o gid=500 -p 2222 <your login on bren><your mounted disk from the development host> <mountpoint>
local host$ ln -s <mountpoint>/<path-to-uClinux-dist>/images /tftpboot

If your tftp server is set up to serve from /tftpboot as suggested above your EA board now loads on your local network directly from the development host.

You can put the IP address for in your local /etc/hosts file.