Mounting a remote directory using ssh

In the checklist below, the "local" pc is the one you are working on, and the "remote" pc is the one that has the directory you want to access.

  • Generate an ssh key for passwordless login, as follows:
    • local: run ssh-keygen, do not add a pass phrase
    • local: copy .ssh/ to the remote host
    • remote: cat >> .ssh/authorized_keys
    • local: test if passwordless login to remote host works
  • local: install sshfs
  • local: sshfs remote:/directory /mnt/local_mountpoint -o follow_symlinks

To unmount, use:

  • fusermount -u /mnt/local_mountpoint
This entry was posted in linux. Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *