Using sshfs

Jurjen Bokma

October 2010


We want to mount the home directory of some-lwp on other-host, so we can access that dir from both systems.

  1. user@other-host:~$ ssh p123456@some-lwp.subdomain.rug.nl
    <snip>
    p123456@some-lwp:~$ logout
    Connection to some-lwp.subdomain.rug.nl closed.

  2. user@other-host:~$ mkdir p123456@some-lwp

    [Note]Note

    Yes, there's an @-sign in that directory name. No, it's not necessary. We could've named it blueberry.

  3. user@other-host:~$ sshfs p123456@some-lwp.subdomain.rug.nl:/path-to-homedir/p123456 ~/p123456@some-lwp/
    p123456@some-lwp.subdomain.rug.nl's password:
    user@other-host:~$ ls p123456@some-lwp/
    < contents of my homedir snipped >
    user@other-host:~$

    [Note]Note

    Using a ~ for the remote homedir didn't work. You 've got to write it out, as is logical: the ~ is expanded by the local bash, and it may not expand to the same thing as the remote ~.

  4. user@other-host:~$ fusermount -u p123456@some-lwp