Last active
May 7, 2016 20:19
-
-
Save gwpl/a230b76ff2fa82e1382b9ec7be120263 to your computer and use it in GitHub Desktop.
sshfs mount config snippets
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#/etc/fstab | |
# remote on remoteY ( remoteY has to be defined in /root/.ssh/config,/home/userX/.ssh/config ) | |
userX@remoteY:/mnt/remoteY/ext4/userX/mount /mnt/remoteY_mount fuse.sshfs noauto,x-systemd.automount,x-systemd.device-timeout=10,_netdev,user,idmap=user,transform_symlinks,identityfile=/home/gwpl/.ssh/id_ecdsa521_sftplenovox230,allow_other,default_permissions,uid=123456789,gid=100,reconnect 0 0 | |
# assuming 123456789 is UID and 100 GID desired of mount |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# /etc/systemd/system/killsshfs_on_shutdown.service | |
# remember to systemctl enable killsshfs_on_shutdown.service | |
[Unit] | |
After=network.target | |
[Service] | |
RemainAfterExit=yes | |
ExecStart=-/bin/true | |
ExecStop=-/usr/bin/pkill sshfs | |
[Install] | |
WantedBy=multi-user.target | |
# from: https://wiki.archlinux.org/index.php/SSHFS#Troubleshooting |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# .ssh/config | |
Host remoteY | |
TCPKeepAlive yes | |
ServerAliveCountMax 1 | |
ServerAliveInterval 5 | |
# from : Prevent Hanging sshfs Connections https://www.johnhawthorn.com/2011/04/prevent-hanging-sshfs-connections/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment