Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

While I am able to mount a folder from a remote server using mount folder the entry in fstab is giving Connection reset by peer:

I have the following in my fstab

sshfs#username@remote:/folder/ folder fuse defaults,idmap=user 0 0

I have also configure trusted relationship between the remote server and the origin using public keys. and I am able to do ssh remote and authenticate without using a password.

Also, If I log in on the origin machine and use:

mount folder

the folder mounts succesfully.

Any suggestions?

Origin distro : 12.04 Remote server: 11.10

share|improve this question

sshfs needs a network connection. Maybe it is not set up at the time the ftsab mounts are executed. Never had problems with cable network but if I use wifi I have to mount it manually too. You also should add the _netdev parameter to your fstab. Otherwise the mount is waiting for a timeout and it will slow down your boot process.

share|improve this answer

Looks like your missing the -o identifyfile=

sshfs#username@remote:/folder/ folder -o identityfile=~/yourkeyfile  fuse defaults,idmap=user 0 0

also keep in mind your home dir will not be decrypted by this point so what I do is make a read only folder /keys for my keys

also, what I did to make things stupid simple was added sshfs to a python script and then in cron I put:

@reboot <username> /usr/bin/python /scripts/ >> /scripts/servermount.log

Here is the python script:


import os

os.system ("sshfs -o identityfile=<KEYFILE> <USERNAME>@<ADDRESS>:/storage /storage")

just make sure you +x it!

share|improve this answer

Your Answer


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.