Rechner per sshfs einbinden: Unterschied zwischen den Versionen

Aus Tutorials
Zur Navigation springen Zur Suche springen
Zeile 5: Zeile 5:


<code>sudo usermod -aG fuse ''<user name>''</code>
<code>sudo usermod -aG fuse ''<user name>''</code>
'''Erstellen eines Scripts zur Verbindung:'''
<pre style="white-space: pre-wrap;
white-space: -moz-pre-wrap;
white-space: -pre-wrap;
white-space: -o-pre-wrap;
word-wrap: break-word;">
#!/bin/sh
# /bin/mount_backup
case "$1" in
mount)
echo "Mount 10.0.0.101:/media/backup/webserver/ into /media/backup"
sudo sshfs martin@10.0.0.101:/media/backup/webserver/ /media/backup/
;;
unmount)
fusermount -u /media/backup
;;
*)
echo "Usage: /bin/sshfs_mount {mount|umount}"
exit 1
;;
esac
exit 0
</pre>

Version vom 5. März 2016, 10:42 Uhr

sudo apt-get install sshfs


Benutzer, der sshfs aufruf, zu der Gruppe fuse hinzufügen:

sudo usermod -aG fuse <user name>


Erstellen eines Scripts zur Verbindung:


#!/bin/sh
# /bin/mount_backup

case "$1" in
mount)
echo "Mount 10.0.0.101:/media/backup/webserver/ into /media/backup"
sudo sshfs martin@10.0.0.101:/media/backup/webserver/ /media/backup/
;;
unmount)
fusermount -u /media/backup
;;
*)
echo "Usage: /bin/sshfs_mount {mount|umount}"
exit 1
;;
esac

exit 0