To do that we write these lines at the end of the file /etc/rc.common: /Library/Filesystems/osxfusefs.fs/Support/load_osxfusefs It will be nice to set this variable in the /etc/nf file, but the problem is that we can only set up this variable once the kernel module is loaded. However, if we want to automatically mount the remote folder, we must continue with the process.įor use OSX fuse in the automount tools, we need to set the next kernel variable to 1: _other=1 To do that, we need to install the ssh-copy-id script: $ brew install ssh-copy-idĬopy the key using the previously installed script: $ ssh-copy-id -i ~/.ssh/myserver_id_rsa.pub It will ask for the passwordĪnd then test if it is ok trying to connect to the server: $ ssh -i ~/.ssh/myserver_id_rsa It won't ask for the password!!!Īt this point, we can manually mount sshfs like in the previous section, but using the shared key: $ sshfs -o IdentityFile=~/.ssh/myserver_id_rsa /my/local/folder To create a shared key, we do: $ ssh-keygen -t rsaĮnter file in which to save the key (/Users/myuser/.ssh/id_rsa): /Users/myuser/.ssh/myserver_id_rsa This means that we need to create a shared key which the daemon can use to connect to the server. The automount system runs as a daemon without user interaction. Note: type yoursecretpassword Using automountįor use OSXFUSE on a Mac, we need to write a single line in the file /etc/auto_home, but, we need to prepare other stuffs first. The steps were: $ sudo mkdir /home/projects I unmount the /home folder running umount /home (be careful, you must not be in this folder while running this command).Īt this point, I can create a new folder, change the permissions for the new folder created, and mount the remote filesystem. After that, I run sudo automount -vc to tell the daemon that the configuration file was changed. To deactivate the automount, I only need to edit the file /etc/auto_master and comment the line starting with /home auto_home. Also, you can use homebrew, but, in this moment, the OSXFUSE version is still the 2.6.4 and you can have problems using the automount. The easy way to install SSHFS is navigate to and download two files: In the next sections I will explain how to install SSHFS for Mac and two different ways to mount remote a ssh folder: deactivating the automount and using it. However, radical changes like this are ill-advised. My first thought was: "well, I could deactivate the automount”. I ran the mount command and found that the /home folder on Mavericks is an auto mounted folder (see the automount man page). When I run mkdir on my mac to create the /home/projects folder, the command runs but doesn’t create a folder. This point is not a negotiable due to the project requirements. It works really well in Linux and we don't want to use a different system for other operating systems.įor this project I need a new folder inside my /home folder to use as a mount point for the remote file system. The best solution we found in the lab is using SSH and mounting folders using sshfs. It is insane to copy it to your hard drive every time it changes or manage large amounts of data with version control since it will slow down the repository. Mounting a server folder is very useful if you have a lot of data to share with your colleagues. It seems to be a simple task, but there is one issue: I am a Mac user. The current project I am working on needs to access to a folder on a remote server.
0 Comments
Leave a Reply. |