{"id":125,"date":"2015-03-31T08:15:36","date_gmt":"2015-03-31T08:15:36","guid":{"rendered":"https:\/\/www.nonamehosts.com\/blog\/?p=125"},"modified":"2015-03-31T08:15:36","modified_gmt":"2015-03-31T08:15:36","slug":"mount-remote-directory-with-sshfs","status":"publish","type":"post","link":"https:\/\/www.nonamehosts.com\/blog\/tutorials\/mount-remote-directory-with-sshfs\/","title":{"rendered":"Mount remote directory with sshfs"},"content":{"rendered":"<p style=\"text-align: justify;\">In computing, 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. Using SSHFS, a remote file system may be treated in the same way as other volumes (such as CDs, DVDs, USB flash drives and shared disks).<\/p>\n<p style=\"text-align: justify;\"><!--more--><\/p>\n<h2>Installing SSHFS on a Ubuntu \/ Debian<\/h2>\n<pre class=\"bash\"># apt-get install sshfs\n<\/pre>\n<h2>Installing SSHFS on a RHEL \/ CentOS<\/h2>\n<pre class=\"bash\"># yum install fuse-sshfs<\/pre>\n<h2>How TO\u00a0mount remote filesystem?<\/h2>\n<p>The syntax is following:<\/p>\n<pre class=\"bash \"># sshfs user@server1 \/path\/to\/mount_point\n# sshfs user@server1 \/path\/to\/mount_point options<\/pre>\n<p>In the first place, we need to create a directory where sshfs filesystem will be mounted.<\/p>\n<pre class=\"bash\"># mkdir \/mnt\/server1<\/pre>\n<p>I&#8217;m going to mount the filesystem using root user:<\/p>\n<pre class=\"bash\"># sshfs root@192.168.1.142:\/ \/mnt\/server1\/\n\u00a0\n##  For connections that uses ssh keys ##\n# sshfs -o IdentityFile=~\/.ssh\/keyfile \/mnt\/server1\/<\/pre>\n<p>Check if filesystem is mounted successfully with df command:<\/p>\n<pre class=\"\"># df -f\nFilesystem              Size  Used Avail Use% Mounted on\n\/dev\/mapper\/wks05-root  487G  114G  350G  25% \/\nroot@192.168.1.142:\/     20G   12G  6.8G  64% \/mnt\/server1<\/pre>\n<p>To unmount<\/p>\n<pre class=\"bash\">umount \/mnt\/server1<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>In computing, 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 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5],"tags":[57,68,78,108,115,126],"class_list":["post-125","post","type-post","status-publish","format-standard","hentry","category-tutorials","tag-howto","tag-linux","tag-mount","tag-remote","tag-server","tag-sshfs"],"_links":{"self":[{"href":"https:\/\/www.nonamehosts.com\/blog\/wp-json\/wp\/v2\/posts\/125","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.nonamehosts.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.nonamehosts.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.nonamehosts.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.nonamehosts.com\/blog\/wp-json\/wp\/v2\/comments?post=125"}],"version-history":[{"count":0,"href":"https:\/\/www.nonamehosts.com\/blog\/wp-json\/wp\/v2\/posts\/125\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.nonamehosts.com\/blog\/wp-json\/wp\/v2\/media?parent=125"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.nonamehosts.com\/blog\/wp-json\/wp\/v2\/categories?post=125"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.nonamehosts.com\/blog\/wp-json\/wp\/v2\/tags?post=125"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}