Daaaaaaamn… SSHFS… Just when I thought it couldn’t get any better… Self-reconnecting SSHFS after connection dropped.

So… IF you’re not using SSHFS yet – check it out here.

I was / am still perhaps suffering from a tg3 module crash which caused my network connection to drop and then reconnect almost immediately. That wouldn’t be such a big issue IF it didn’t leave me with a disconnected SSHFS shares… Pain in the butt… Major. So I thought about writing a script or some other method of detecting the tg3 crash and then re-running the sshfs share mounting commands. Turns out there is no need because -o reconnect is already built into the SSHFS… HOW COOL IS THIS?!… Very.

basically you’re using the exact same command as you did before but right after sshfs you are adding -o reconnect and it friggin works.

sshfs -o reconnect -p 20202 andrzejl@192.168.0.1:/media/1862_GB_X-Ternal/ /media/1862_GB_X-Ternal/

This shit is awesome…

Cheers.

Andrzej

AndrzejL

"Never meet Your heroes. Most of the time you'll only end up disappointed." White Polak Male Husband Employee Hetero Carnivorous Fugly Geek @$$hole with ADD Catholic “Some men just want to watch the world burn.”

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.