Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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...

#!/bin/bash

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

sudo sshfs -o allow_other 192.168.1.10:/media/ctb /mnt/ctb
sudo sshfs -o allow_other 192.168.1.10:/media/dtb /mnt/dtb
sudo sshfs -o allow_other 192.168.1.10:/media/etb /mnt/etb

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

share|improve this question

1 Answer 1

up vote 4 down vote accepted

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 192.168.1.10 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.

share|improve this answer
    
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

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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