{"id":539,"date":"2025-10-17T20:41:35","date_gmt":"2025-10-17T19:41:35","guid":{"rendered":"https:\/\/blog.inplico.uk\/?p=539"},"modified":"2025-10-17T20:45:02","modified_gmt":"2025-10-17T19:45:02","slug":"sshfs-mac","status":"publish","type":"post","link":"https:\/\/blog.inplico.uk\/?p=539","title":{"rendered":"sshfs Mac"},"content":{"rendered":"<p>Before you read this make sure that you are able to log in to the remote server you are trying to mount using ssh without a password;\u00a0 If not then follow the instructions on this blog.<\/p>\n<p>Next you will need to install macFUSE and sshfs.\u00a0 You can download macFUSE and sshfs from here https:\/\/macfuse.github.io\/<\/p>\n<p>Once you have them installed make a directory in your home directory and mount the remote server to it from the command line<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">sshfs user@fqdn.co.uk:\/folder ~\/mountpoint -oreconnect,allow_other,volname=anyMeaningfulName<\/pre>\n<p>If it mounts without a password then you can move on to getting it to automount.\u00a0 To do this you need to create an xml file in ~\/Library\/LaunchAgents\/ The name of this file can be anything, but convention says that it is named according to rdns convention then folder then literal &#8220;sshfs&#8221; and the final suffix is &#8220;plist&#8221;. Whatever you decide to name it the suffix must always be .plist.<\/p>\n<p>so using the above it would be:<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">uk.co.fqdn.folder.sshfs.plist<\/pre>\n<p>the contents of the daemon configuration file are as follows:<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">&lt;?xml version=\"1.0\" encoding=\"UTF-8\"?&gt;\r\n&lt;!DOCTYPE plist PUBLIC \"-\/\/Apple Computer\/\/DTD PLIST 1.0\/\/EN\" \"http:\/\/www.apple.com\/DTDs\/PropertyList-1.0.dtd\"&gt;\r\n&lt;plist version=\"1.0\"&gt;\r\n&lt;dict&gt;\r\n    &lt;key&gt;Label&lt;\/key&gt;\r\n    &lt;string&gt;NAME.sshfs&lt;\/string&gt;\r\n    &lt;key&gt;ProgramArguments&lt;\/key&gt;\r\n    &lt;array&gt;\r\n            &lt;string&gt;\/usr\/local\/bin\/sshfs-authsock&lt;\/string&gt;\r\n            &lt;string&gt;user@fqdn.co.uk:\/folder&lt;\/string&gt;\r\n            &lt;string&gt;\/Users\/username\/mountpoint&lt;\/string&gt;\r\n            &lt;string&gt;-oreconnect,auto_cache,volname=anyMeaningfulName&lt;\/string&gt;\r\n            &lt;string&gt;-f&lt;\/string&gt;\r\n    &lt;\/array&gt;\r\n    &lt;key&gt;RunAtLoad&lt;\/key&gt;\r\n    &lt;true\/&gt;\r\n&lt;\/dict&gt;\r\n&lt;\/plist&gt;<\/pre>\n<p>If the folder happens to be mounted at this point then you need to unmount it<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">umount ~\/mountpoint<\/pre>\n<p>Make sure that the folder is not mounted and then issue the following 2 commands<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">launchctl load ~\/Library\/LaunchAgents\/uk.co.fqdn.folder.sshfs.plist\r\nlaunchctl start uk.co.fqdn.folder.sshfs.plist<\/pre>\n<p>Now check that the folder is mounted.\u00a0 If it is then you are done, it should automount on reboot.\u00a0 If it doesn&#8217;t then unload it, edit the configuration file and try again.<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">launchctl unload ~\/Library\/LaunchAgents\/uk.co.fqdn.folder.sshfs.plist<\/pre>\n<p>You might need to stop any stray sshfs processes.\u00a0 Use<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">ps auxwww | grep sshfs<\/pre>\n<p>to see if any are running.<\/p>\n<p>Acknowledgement to <a dir=\"auto\" href=\"https:\/\/superuser.com\/users\/581948\/oliora\">oliora<\/a> https:\/\/superuser.com\/questions\/134140\/mount-an-sshfs-via-macfuse-at-boot<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Before you read this make sure that you are able to log in to the remote server you are trying to mount using ssh without a password;\u00a0 If not then follow the instructions on this blog. Next you will need to install macFUSE and sshfs.\u00a0 You can download macFUSE and sshfs from here https:\/\/macfuse.github.io\/ Once [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[16,2],"tags":[],"class_list":["post-539","post","type-post","status-publish","format-standard","hentry","category-apple","category-hints-tricks"],"_links":{"self":[{"href":"https:\/\/blog.inplico.uk\/index.php?rest_route=\/wp\/v2\/posts\/539","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.inplico.uk\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.inplico.uk\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.inplico.uk\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.inplico.uk\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=539"}],"version-history":[{"count":4,"href":"https:\/\/blog.inplico.uk\/index.php?rest_route=\/wp\/v2\/posts\/539\/revisions"}],"predecessor-version":[{"id":543,"href":"https:\/\/blog.inplico.uk\/index.php?rest_route=\/wp\/v2\/posts\/539\/revisions\/543"}],"wp:attachment":[{"href":"https:\/\/blog.inplico.uk\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=539"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.inplico.uk\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=539"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.inplico.uk\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=539"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}