LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   How to mount SSHFS on startup when key-based authentication isn't possible? (https://www.linuxquestions.org/questions/linux-newbie-8/how-to-mount-sshfs-on-startup-when-key-based-authentication-isnt-possible-4175460556/)

veeruk101 05-03-2013 06:26 AM

How to mount SSHFS on startup when key-based authentication isn't possible?
 
I have 2 drives in a NAS I'd like to mount through SSHFS, but because of some limitations of the NAS it's not possible to use key-based authentication, so I must use a password. Because of this, am I correct to think that using fstab is not a possibility?

What would be the correct way to mount these drives? I can't do it in my bash profile files, because it needs to be available earlier than that in system startup, because the backup application that I use, called CrashPlan, starts backing up as the root user when the system boots up (through I believe an init script), so it expects the backup locations to be accessible then.

lleb 05-03-2013 07:14 AM

what is the file format of the NAS? is it possible to mount it as a CIFS or NFS share? as for sshfs you are correct without ssh keys you are not going to be able to mount until the system is up and running. it could be done via a bash script using expect to hold your p/w, but that would defeat the sshfs security as you would then be transmitting the p/w in plain text.

pan64 05-03-2013 07:19 AM

so you will probably need to write another init script to do the job (and execute it before CrashPlan)

veeruk101 05-04-2013 05:23 AM

I ran "sudo find /etc | grep crashplan" and got the following output:

Code:

/etc/init.d[/crashplan
/etc/sysctl.d/60-crashplan.conf
/etc/rc2.d/S99crashplan

Is it okay for me to put the mount commands in /etc/rc.local if I want them to run before the rc*.d/ scripts, or should I do it differently?


All times are GMT -5. The time now is 10:19 PM.