{"id":80,"date":"2019-04-29T14:43:02","date_gmt":"2019-04-29T14:43:02","guid":{"rendered":"https:\/\/techplushost.com\/blog\/?p=80"},"modified":"2019-04-29T14:54:30","modified_gmt":"2019-04-29T14:54:30","slug":"sshfs-installation-and-mounting","status":"publish","type":"post","link":"https:\/\/techplushost.com\/blog\/sshfs-installation-and-mounting\/","title":{"rendered":"SSHFS: Installation and Mounting"},"content":{"rendered":"\n<figure class=\"wp-block-image\"><a href=\"https:\/\/i2.wp.com\/community.time4vps.com\/uploads\/editor\/rs\/3amawmmro567.jpg?ssl=1\" target=\"_blank\" rel=\"noreferrer noopener\"><img src=\"https:\/\/i2.wp.com\/community.time4vps.com\/uploads\/editor\/rs\/3amawmmro567.jpg?w=960&#038;ssl=1\" alt=\"\" data-recalc-dims=\"1\"\/><\/a><\/figure>\n\n\n\n<p><strong>Introduction<\/strong><\/p>\n\n\n\n<p>SSHFS (SSH Filesystem) is a filesystem client to mount and interact with directories and files located on a remote server or workstation over a normal ssh connection. The client interacts with the remote file system via the SSH File Transfer Protocol (SFTP), a network protocol providing file access, file transfer, and file management functionality over any reliable data stream that was designed as an extension of the Secure Shell protocol (SSH) version 2.0. The current implementation of SSHFS using FUSE is a rewrite of an earlier version.<\/p>\n\n\n\n<p>FUSE (Filesystem in Userspace) is an interface for userspace programs to export a filesystem to the Linux kernel. The FUSE project consists of two components: the&nbsp;<em>fuse<\/em>&nbsp;kernel module (maintained in the regular kernel repositories) and the&nbsp;<em>libfuse<\/em>&nbsp;userspace library (maintained in this repository). libfuse provides the reference implementation for communicating with the FUSE kernel module.<\/p>\n\n\n\n<p>A FUSE file system is typically implemented as a standalone application that links with libfuse. libfuse provides functions to mount the file system, unmount it, read requests from the kernel, and send responses back.<br><strong>Installation<\/strong><\/p>\n\n\n\n<p>SSHFS is Linux based software that needs to be installed on your server. On Ubuntu and Debian based systems it can be installed through apt-get.<br><\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">apt-get install sshfs<\/pre>\n\n\n\n<p><strong><br>Mounting<\/strong><br><\/p>\n\n\n\n<p>To start we will need to create a local directory in which to mount the verser&#8217;s file system.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">mkdir \/mnt\/name_of_directory<\/pre>\n\n\n\n<p>Now we can use sshfs to mount the file system locally with the following command:<br><\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">sshfs root@ip_of_server:\/ \/mnt\/name_of_directory<\/pre>\n\n\n\n<p>Now you can work with files on your remote server (or like in this tutorial&#8217;s example on local folder) as if it were a physical device attached to your local machine. For instance, if you move to the \/mnt\/name_of_directory directory on your local machine you can create a file locally and the file will appear on your virtual server. Likewise you can copy files into the \/mnt\/name_of_directory folder and they will be uploaded to your remote server in the background.<\/p>\n\n\n\n<p>To see all mounted devices you can use command:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">df -hT<\/pre>\n\n\n\n<figure class=\"wp-block-image\"><a href=\"https:\/\/i0.wp.com\/community.time4vps.com\/uploads\/editor\/t2\/clrbd6t3rwxc.jpg?ssl=1\" target=\"_blank\" rel=\"noreferrer noopener\"><img src=\"https:\/\/i0.wp.com\/community.time4vps.com\/uploads\/editor\/t2\/clrbd6t3rwxc.jpg?w=960&#038;ssl=1\" alt=\"\" data-recalc-dims=\"1\"\/><\/a><\/figure>\n\n\n\n<p>Note: This process provides only a temporary mount. If the VPS is restarted, you will need to use the same process to mount it again.<br><strong>Unmounting<\/strong><\/p>\n\n\n\n<p>When you no longer need the mount point you can simply unmount it with the command:<br><\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">umount \/mnt\/name_of_directory<\/pre>\n\n\n\n<p><strong>Permanent Mounting<\/strong><\/p>\n\n\n\n<p>SSHFS also allows for setting up permanent mount points to remote file systems. This would set a mount point that would persist through restarts of both your local machine and servers. In order to set up a permanent mount point, we will need to edit the \/etc\/fstab file on the local machine to automatically mount the file system each time the system is booted.<\/p>\n\n\n\n<p>First we need to edit the&nbsp;<em>\/etc\/fstab<\/em>&nbsp;file with a text editor.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">nano \/etc\/fstab<\/pre>\n\n\n\n<p>Note: If&nbsp;<em>nano<\/em>&nbsp;is not installed on your server you can do it with command:<br><\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">apt-get install nano <\/pre>\n\n\n\n<p>Scroll to the bottom of the file and add the following entry<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">sshfs#root@ip_of_server:\/ \/mnt\/name_of_directory<\/pre>\n\n\n\n<p>Save the changes to&nbsp;<em>\/etc\/fstab<\/em>&nbsp;and reboot if necessary.<\/p>\n\n\n\n<p>Note: Permanently mounting your VPS file system locally is a potential security risk. If your local machine is compromised it allows for a direct route to your server. Therefore it is not recommended to setup permanent mounts on production servers.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Introduction SSHFS (SSH Filesystem) is a filesystem client to mount and interact with directories and files located on a remote server or workstation over a normal ssh connection. The client interacts with the remote file system via the SSH File Transfer Protocol (SFTP), a network protocol providing file access, file &hellip; <\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"spay_email":"","jetpack_publicize_message":"","jetpack_is_tweetstorm":false},"categories":[14],"tags":[65,66],"jetpack_featured_media_url":"","jetpack_publicize_connections":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v15.4 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>SSHFS: Installation and Mounting | TechPlusHost | Blog<\/title>\n<meta name=\"description\" content=\"SSHFS (SSH Filesystem) is a filesystem client to mount and interact with directories and files located on a remote server or workstation over a normal ssh connection. The client interacts with the remote file system via the SSH File Transfer Protocol (SFTP), a network protocol providing file access, file transfer, and file management functionality over any reliable data stream that was designed as an extension of the Secure Shell protocol (SSH) version 2.0. The current implementation of SSHFS using FUSE is a rewrite of an earlier version.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/techplushost.com\/blog\/sshfs-installation-and-mounting\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"SSHFS: Installation and Mounting | TechPlusHost | Blog\" \/>\n<meta property=\"og:description\" content=\"SSHFS (SSH Filesystem) is a filesystem client to mount and interact with directories and files located on a remote server or workstation over a normal ssh connection. The client interacts with the remote file system via the SSH File Transfer Protocol (SFTP), a network protocol providing file access, file transfer, and file management functionality over any reliable data stream that was designed as an extension of the Secure Shell protocol (SSH) version 2.0. The current implementation of SSHFS using FUSE is a rewrite of an earlier version.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/techplushost.com\/blog\/sshfs-installation-and-mounting\/\" \/>\n<meta property=\"og:site_name\" content=\"TechPlusHost | Blog\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/web.facebook.com\/techplushost\" \/>\n<meta property=\"article:published_time\" content=\"2019-04-29T14:43:02+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2019-04-29T14:54:30+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/community.time4vps.com\/uploads\/editor\/rs\/3amawmmro567.jpg\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@techplushost\" \/>\n<meta name=\"twitter:site\" content=\"@techplushost\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\">\n\t<meta name=\"twitter:data1\" content=\"Tolulope Oyeniyi\">\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\">\n\t<meta name=\"twitter:data2\" content=\"2 minutes\">\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https:\/\/techplushost.com\/blog\/#organization\",\"name\":\"TechPlusHost\",\"url\":\"https:\/\/techplushost.com\/blog\/\",\"sameAs\":[\"https:\/\/web.facebook.com\/techplushost\",\"https:\/\/www.instagram.com\/techplushost\/\",\"https:\/\/twitter.com\/techplushost\"],\"logo\":{\"@type\":\"ImageObject\",\"@id\":\"https:\/\/techplushost.com\/blog\/#logo\",\"inLanguage\":\"en-US\",\"url\":\"https:\/\/i1.wp.com\/techplushost.com\/blog\/wp-content\/uploads\/2018\/04\/logo.png?fit=314%2C108&ssl=1\",\"width\":314,\"height\":108,\"caption\":\"TechPlusHost\"},\"image\":{\"@id\":\"https:\/\/techplushost.com\/blog\/#logo\"}},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/techplushost.com\/blog\/#website\",\"url\":\"https:\/\/techplushost.com\/blog\/\",\"name\":\"TechPlusHost\",\"description\":\"Our Blog\",\"publisher\":{\"@id\":\"https:\/\/techplushost.com\/blog\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":\"https:\/\/techplushost.com\/blog\/?s={search_term_string}\",\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":\"ImageObject\",\"@id\":\"https:\/\/techplushost.com\/blog\/sshfs-installation-and-mounting\/#primaryimage\",\"inLanguage\":\"en-US\",\"url\":\"https:\/\/community.time4vps.com\/uploads\/editor\/rs\/3amawmmro567.jpg\"},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/techplushost.com\/blog\/sshfs-installation-and-mounting\/#webpage\",\"url\":\"https:\/\/techplushost.com\/blog\/sshfs-installation-and-mounting\/\",\"name\":\"SSHFS: Installation and Mounting | TechPlusHost | Blog\",\"isPartOf\":{\"@id\":\"https:\/\/techplushost.com\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/techplushost.com\/blog\/sshfs-installation-and-mounting\/#primaryimage\"},\"datePublished\":\"2019-04-29T14:43:02+00:00\",\"dateModified\":\"2019-04-29T14:54:30+00:00\",\"description\":\"SSHFS (SSH Filesystem) is a filesystem client to mount and interact with directories and files located on a remote server or workstation over a normal ssh connection. The client interacts with the remote file system via the SSH File Transfer Protocol (SFTP), a network protocol providing file access, file transfer, and file management functionality over any reliable data stream that was designed as an extension of the Secure Shell protocol (SSH) version 2.0. The current implementation of SSHFS using FUSE is a rewrite of an earlier version.\",\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/techplushost.com\/blog\/sshfs-installation-and-mounting\/\"]}]},{\"@type\":\"Article\",\"@id\":\"https:\/\/techplushost.com\/blog\/sshfs-installation-and-mounting\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/techplushost.com\/blog\/sshfs-installation-and-mounting\/#webpage\"},\"author\":{\"@id\":\"https:\/\/techplushost.com\/blog\/#\/schema\/person\/05c8d030ad69f48b481298cd68c7df43\"},\"headline\":\"SSHFS: Installation and Mounting\",\"datePublished\":\"2019-04-29T14:43:02+00:00\",\"dateModified\":\"2019-04-29T14:54:30+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/techplushost.com\/blog\/sshfs-installation-and-mounting\/#webpage\"},\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/techplushost.com\/blog\/#organization\"},\"image\":{\"@id\":\"https:\/\/techplushost.com\/blog\/sshfs-installation-and-mounting\/#primaryimage\"},\"keywords\":\"FUSE,SSHFS\",\"articleSection\":\"Linux Applications\",\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/techplushost.com\/blog\/sshfs-installation-and-mounting\/#respond\"]}]},{\"@type\":\"Person\",\"@id\":\"https:\/\/techplushost.com\/blog\/#\/schema\/person\/05c8d030ad69f48b481298cd68c7df43\",\"name\":\"Tolulope Oyeniyi\",\"image\":{\"@type\":\"ImageObject\",\"@id\":\"https:\/\/techplushost.com\/blog\/#personlogo\",\"inLanguage\":\"en-US\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/862d4163a73f8f6f83733690bfb1b535?s=96&d=wavatar&r=g\",\"caption\":\"Tolulope Oyeniyi\"},\"sameAs\":[\"https:\/\/techplushost.com\"]}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p9RiNW-1i","jetpack-related-posts":[{"id":86,"url":"https:\/\/techplushost.com\/blog\/how-to-manually-import-emails\/","url_meta":{"origin":80,"position":0},"title":"How to manually import emails","date":"May 1, 2019","format":false,"excerpt":"Instructions for manual import of the emails to your CWP server. 1. Create all required mailboxes via CWP2. Login in each created mailbox (this will create required file and folder structure)3. Copy the emails (like any other files) in \/var\/vmail\/DOMAIN.COM\/USERNAME4. Fix Permissions (chown uploaded files vmail:mail) Example path for email\u2026","rel":"","context":"In &quot;Web hosting control panels&quot;","img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":27,"url":"https:\/\/techplushost.com\/blog\/how-to-view-linux-logs\/","url_meta":{"origin":80,"position":1},"title":"How to view Linux Logs?","date":"April 24, 2018","format":false,"excerpt":"When your systems are running smoothly, take some time to learn and understand the content of various log files, which will help you when there is a crisis and you have to look though the log files to identify the issue. The operating system and running applications constantly create different\u2026","rel":"","context":"In &quot;Various Tutorials&quot;","img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":90,"url":"https:\/\/techplushost.com\/blog\/windows-connecting-to-windows-vps-server-using-rdp\/","url_meta":{"origin":80,"position":2},"title":"[Windows] Connecting to Windows VPS server using RDP","date":"May 3, 2019","format":false,"excerpt":"Remote Desktop Protocol (RDP)\u00a0- is protocol created by Microsoft, which provides a graphical interface for a user. RDP client is available in most operating systems. By default RDP uses 3389 TCP port.\u00a0Remote Desktop Connection\u00a0is the official program meant for login via RDP.\u00a0 Requirements: Windows VPS server with Windows 2012 or\u2026","rel":"","context":"In \"RDP\"","img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":45,"url":"https:\/\/techplushost.com\/blog\/centmin-mod-installation-of-centmin-mod-control-panel\/","url_meta":{"origin":80,"position":3},"title":"[Centmin Mod] Installation of Centmin Mod control panel","date":"April 25, 2018","format":false,"excerpt":"CentMin Mod\u00a0is a shell based control panel for CentOS operating system with LEMP Stack install. It was intended for a single root user\/administrator to manage multiple or single website on a VPS. It is highly recommended for those who wish a simple control panel for their websites with no fancy\u2026","rel":"","context":"In &quot;KVM Based Servers&quot;","img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":67,"url":"https:\/\/techplushost.com\/blog\/directadmin-license-renewal\/","url_meta":{"origin":80,"position":4},"title":"[DirectAdmin] license renewal","date":"April 25, 2018","format":false,"excerpt":"In some cases you may encounter an issue in your DirectAdmin control panel with error message \"License has expired\". We provide the DirectAdmin license until you use the server you purchased the DirectAdmin with and to solve this issue you need to apply three simple commands in your server while\u2026","rel":"","context":"In &quot;Web hosting control panels&quot;","img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":43,"url":"https:\/\/techplushost.com\/blog\/cpanel-whm-creating-second-whm-user-with-root-privileges\/","url_meta":{"origin":80,"position":5},"title":"[cPanel\/WHM] Creating second WHM user with root privileges","date":"April 25, 2018","format":false,"excerpt":"n order to have more than one user with\u00a0root\u00a0privileges to handle\u00a0WHM\u00a0as a Reseller, there are several steps to take. You should login to your server via SSH and use these commands below: useradd secondroot passwd secondroot usermod -aG wheel secondroot echo \"secondroot:all\" >> \/var\/cpanel\/resellers Please take a note that \"secondroot\"\u2026","rel":"","context":"In &quot;Web hosting control panels&quot;","img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]}],"_links":{"self":[{"href":"https:\/\/techplushost.com\/blog\/wp-json\/wp\/v2\/posts\/80"}],"collection":[{"href":"https:\/\/techplushost.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/techplushost.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/techplushost.com\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/techplushost.com\/blog\/wp-json\/wp\/v2\/comments?post=80"}],"version-history":[{"count":1,"href":"https:\/\/techplushost.com\/blog\/wp-json\/wp\/v2\/posts\/80\/revisions"}],"predecessor-version":[{"id":81,"href":"https:\/\/techplushost.com\/blog\/wp-json\/wp\/v2\/posts\/80\/revisions\/81"}],"wp:attachment":[{"href":"https:\/\/techplushost.com\/blog\/wp-json\/wp\/v2\/media?parent=80"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/techplushost.com\/blog\/wp-json\/wp\/v2\/categories?post=80"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/techplushost.com\/blog\/wp-json\/wp\/v2\/tags?post=80"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}