Feb 5, 2012

Improving sshfs connections

I'm finding sshfs to be excellent for remotely accessing drives over ssh. There's a couple of tweaks to the ssh config file that can make things even better. If you haven't used an ssh config file, it can be used to store general and connection specific information, to save you typing it every time. The file lives in ~/.ssh/config

Host <hostname>

features

Host <otherhostname>

features

e.g.,

Host short

Hostname ssh.long_url_name.com

Username myusername

so, instead of typing ssh myusername@ssh.long_url_name.com I can instead run the following:
ssh short
To improve the sshfs you should add
ServerAliveInterval 15 
to the Host that you connect over sshfs, which will make sshfs to a ssh keepalive ping every 15 seconds.

There are comments.

Comments !