Share your knowledge at the LQ Wiki.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 05-03-2013, 06:26 AM   #1
Registered: Mar 2005
Distribution: Ubuntu 12.04 LTS
Posts: 249

Rep: Reputation: 16
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.
Old 05-03-2013, 07:14 AM   #2
Senior Member
Registered: Dec 2005
Location: Florida
Distribution: CentOS/Fedora
Posts: 2,737

Rep: Reputation: 520Reputation: 520Reputation: 520Reputation: 520Reputation: 520Reputation: 520
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.
Old 05-03-2013, 07:19 AM   #3
LQ Guru
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 12,995

Rep: Reputation: 4097Reputation: 4097Reputation: 4097Reputation: 4097Reputation: 4097Reputation: 4097Reputation: 4097Reputation: 4097Reputation: 4097Reputation: 4097Reputation: 4097
so you will probably need to write another init script to do the job (and execute it before CrashPlan)
Old 05-04-2013, 05:23 AM   #4
Registered: Mar 2005
Distribution: Ubuntu 12.04 LTS
Posts: 249

Original Poster
Rep: Reputation: 16
I ran "sudo find /etc | grep crashplan" and got the following output:

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?


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] SSH2 RSA key based authentication acunacha Linux - Server 4 11-08-2012 09:32 AM
SSH Key based authentication failure kdheepan Linux - Newbie 2 06-08-2011 07:55 AM
problem with ssh key-based authentication kaplan71 Linux - Security 5 12-09-2009 10:34 AM
Key based authentication only for root for SSH the_gripmaster Linux - Security 4 04-18-2009 05:43 PM
problem doing sshfs mount with public key authentication Sambatyon Linux - Networking 1 06-15-2008 07:30 AM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 09:50 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration