Home > Uncategorized > Linux Tip: How to mount a remote directory as non-privileged user

Linux Tip: How to mount a remote directory as non-privileged user

Quick answer : Use SSHFS

Your local machine needs to have loaded FUSE, pretty standard in modern Linux distros and the remote machine needs to run the sshd daemon, also pretty common scenario. Finally, you need an account on the remote machine you can login to. With prerequisites fulfilled, you issue the following command on your local machine:

sshfs -C -o reconnect,workaround=rename [remote-user-name]@[remote-host]:[remote-path] [local-path]

and you’re done!

For example, if the remote-host is “example.com” your username to this host is “kirk” and you want to mount the home directory of this remote user to your local path “/remote/user”, then you can user the following command:

sshfs -C -o reconnect,workaround=rename kirk@example.com:/home/kirk /remote/user

You now have an encrypted connection to the remote machine set up in a matter of seconds.

Advertisements
Categories: Uncategorized Tags: ,
  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: