Difference between revisions of "SSHFS"

From mmmv_kos
Jump to: navigation, search
(Created page with " Linux : FUSE")
 
m
(One intermediate revision by the same user not shown)
Line 1: Line 1:
  
 
[[Linux]] : [[Linux: fuse|FUSE]]
 
[[Linux]] : [[Linux: fuse|FUSE]]
 +
 +
 +
SSHFS on realiseeritud [[Linux: fuse|FUSE]] põhjal ja võimaldab [[SSH]]-kontoga arvutit kohalikku masinasse haakida nagu oleks tegu USB-pulgaga.
 +
 +
 +
 +
= [https://github.com/libfuse/sshfs sshfs] =
 +
 +
<syntaxhighlight lang="bash">
 +
MINA=`whoami`
 +
# There's a group named "fuse" and it kind of "exists by default".
 +
 +
sudo modprobe fuse            # Loads kernel modules, drivers, etc.
 +
sudo useradd -G fuse $MINA
 +
sudo chown root:fuse /dev/fuse
 +
sudo chmod +x /usr/bin/fusermount
 +
sudo chmod 0777 /dev/fuse #  I couldn't figure out, how to do it otherwise
 +
</syntaxhighlight>
 +
 +
 +
<syntaxhighlight lang="bash">
 +
# Tavakasutajana, kõigepealt lahti-haakimine, sest katkenud SSH-ühenduste
 +
# korral automaatset lahtihaakimist ei toimu:
 +
fusermount -u <full path to the mounting point at the ssh client side>
 +
 +
# Alles seejärel haakimine:
 +
sshfs -oport=<port number> <username>@<ipaddress>:<fullpath at the server> <full path to the mounting point at the ssh client side>
 +
 +
# Soovi korral võib kõibe lõppu lisada ka veel
 +
# harilikult ~/.ssh/config failis kirjeldatud parameetreid. Näiteks:
 +
sshfs -oport=<port number> <username>@<ipaddress>:<fullpath at the server> <full path to the mounting point at the ssh client side> -o IdentityFile=$HOME/.ssh/privaatv8tmefail.txt "
 +
</syntaxhighlight>

Revision as of 07:20, 12 January 2020

Linux : FUSE


SSHFS on realiseeritud FUSE põhjal ja võimaldab SSH-kontoga arvutit kohalikku masinasse haakida nagu oleks tegu USB-pulgaga.


sshfs

MINA=`whoami`
# There's a group named "fuse" and it kind of "exists by default".

sudo modprobe fuse             # Loads kernel modules, drivers, etc.
sudo useradd -G fuse $MINA
sudo chown root:fuse /dev/fuse
sudo chmod +x /usr/bin/fusermount
sudo chmod 0777 /dev/fuse #  I couldn't figure out, how to do it otherwise


# Tavakasutajana, kõigepealt lahti-haakimine, sest katkenud SSH-ühenduste
# korral automaatset lahtihaakimist ei toimu:
fusermount -u <full path to the mounting point at the ssh client side>

# Alles seejärel haakimine:
sshfs -oport=<port number> <username>@<ipaddress>:<fullpath at the server> <full path to the mounting point at the ssh client side>

# Soovi korral võib kõibe lõppu lisada ka veel 
# harilikult ~/.ssh/config failis kirjeldatud parameetreid. Näiteks:
sshfs -oport=<port number> <username>@<ipaddress>:<fullpath at the server> <full path to the mounting point at the ssh client side> -o IdentityFile=$HOME/.ssh/privaatv8tmefail.txt "