i have a small bash script that mounts my sshfs...

problem is it ask for the server/host password for every mount...

i have four mounts and i have to enter it every time for 4 times and its tiresome, also i want to make it mount at boot/login...


sudo fusermount -u /mnt/ctb
sudo fusermount -u /mnt/dtb
sudo fusermount -u /mnt/etb

sudo sshfs -o allow_other /mnt/ctb
sudo sshfs -o allow_other /mnt/dtb
sudo sshfs -o allow_other /mnt/etb

after every mount comman it ask me for the password of a user on the machine


You can try generating a ssh key with ssh-keygen on your client system, and place the .ssh/id_rsa.pub public key in .ssh/authorized_keys on the system. See How to harden an SSH server? for more info on this.

Add yourself to the fuse user group, if you haven't. You can use sshfs user@system instead of sudo there if that is set up correctly.

Also read the Ubuntu sshfs wiki if you haven't.

  • did that still no luck – sarveshlad Apr 29 '12 at 21:49
  • OKay got it...... just went through my brain for an analytic common sense analysis.. realised that i was generating ssh-keygen from my account, did it for root user too and bam it works!!!! thanks marking as answered – sarveshlad Apr 29 '12 at 21:52

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.