How to mount remote directory/filesystem over ssh using sshfs for Ubuntu / Linux

$ sudo apt-get install sshfs

check what is the current user and add this user to sshfs

$ whoami  
 $ sudo adduser my_username fuse 

Now make the local directory for mounting the remote folder as,

$ mkdir my_localdirectory 

Mount the remote directory, using sshfs as,

$ sshfs [email protected]_host_ip_or_domainname:/remote_direcory_path/remote_direcory my_localdirectory_path/my_localdirectory

Now, we have mounted remote directory from server to local directory, which we can confirm using mount command as,

$ mount | grep sshfs
[email protected]_host_ip_or_domainname:/remote_direcory_path/remote_direcory on my_localdirectory_path/my_localdirectory type fuse.sshfs (rw,nosuid,nodev,user=my_username)
Android Android Build system Android Commands Android Java Applications Application Libraries Application Stack / User Interface Bash / Shell Scripts Commands and Packages Compilation Content Management System - CMS Core Kernel C Programs Development & Build Development Environment Setup Errors & Failures git Go Language Programs Hardware Platforms HTML JAVA Programs Kernel & Device Drivers Kernel Booting and Porting Linux, OS Concepts and Networking Linux Device Drivers Linux Host, Ubuntu, SysAdmin Linux Kernel Linux Networking Middleware Libraries, HAL Monetization / Google AdSense NDK / Middleware / HAL OS Concepts PHP Programming Languages RaspberryPi Scripting and Automation Search Engine Optimisation ( SEO ) Social Media Socurce Code Management ( SCM ) System Administration, Security Testing and Debugging Uncategorized Userspace Utilities Web design and development Wordpress Yocto / Bitbake / Openembedded

Leave a Reply / Ask Question