Mount a remote SSH folder locally

This is a useful command when you want to interact with a remote folder as if it was on your local drive. 


# First create a local folder to mirror the remote one
mkdir /path/to/local_folder

# replace <user> with the username
#         <host> with the remote hostname or IP address
sshfs  <user>@<host>:/path/to/remote/filer /path/to/local_folder

Now you can access your remote folder as if it was any other local folder.

To unmount the folder

# to unmount
sudo umount /path/to/local_folder

 

For more options, like -p for the port or -o password_stdin to supply a password, check out the manpage of sshfs.