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/id_rsa.pub to the remote host
    • remote: cat id_rsa.pub >> .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 *