SSHFS mit Freetz?

the_freestyler

Neuer User
Mitglied seit
7 Mrz 2007
Beiträge
114
Punkte für Reaktionen
0
Punkte
16
Hallo!

Mir fehlt bisher die Möglichkeit ein entferntes Dateisystem sicher zu mounten.
Da würde sich SSHFS oder auch SHFS gut eignen. Es gab mal ein gebautes SHFS Modul, aber für den 2.4er Kernel. Und da SHFS auch nicht mehr weiterentwickelt wird, habe ich SSHFS probiert, was auf FUSE aufbaut.
Leider scheitere ich mit dem Bau von beiden Paketen.

beim Bau von SSHFS komme ich glaub ich noch am weitesten:

Code:
freetz@freetz-linux:~/sshfs-fuse-2.2$ ./configure --build=i386-linux-gnu --target=mipsel-linux --host=mipsel-linux
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking for mipsel-linux-strip... mipsel-linux-strip
checking for mipsel-linux-gcc... mipsel-linux-gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... yes
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether mipsel-linux-gcc accepts -g... yes
checking for mipsel-linux-gcc option to accept ISO C89... none needed
checking for style of include used by make... GNU
checking dependency style of mipsel-linux-gcc... gcc3
checking whether mipsel-linux-gcc and cc understand -c and -o together... yes
checking for library containing dlsym... -ldl
checking OpenSSH version... 5.1 >= 4.4, disabling NODELAY workaround
checking for mipsel-linux-pkg-config... no
checking for pkg-config... /usr/bin/pkg-config
configure: WARNING: In the future, Autoconf will not detect cross-tools
whose name does not start with the host triplet.  If you think this
configuration is useful to you, please write to [email protected].
checking pkg-config is at least version 0.9.0... yes
checking for SSHFS... configure: error: Package requirements (fuse >= 2.2 glib-2.0 gthread-2.0) were not met:

No package 'fuse' found
No package 'glib-2.0' found
No package 'gthread-2.0' found

Consider adjusting the PKG_CONFIG_PATH environment variable if you
installed software in a non-standard prefix.

Alternatively, you may set the environment variables SSHFS_CFLAGS
and SSHFS_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details.

Kriegen wir das vllt zusammengebaut?

Dank und viele Grüße.
 
Den Thread kenne ich, den brauche ich nicht zu suchen.

Die Problematik darin ist jedoch eine andere. Es soll eine Verbindung von einem System, für das es bereits SSHFS gibt auf die Fritzbox erfolgen.

Und da es SSHFS für die fritzbox noch nicht gibt, und ich mich mit dem Bau beschäftige haben die Threads miteinander nicht so viel zu tun.
 
Es soll eine Verbindung von einem System, für das es bereits SSHFS gibt auf die Fritzbox erfolgen.

Du willst fuse auf der FritzBox (mit Freetz). Dann geht die Verbindung von der FritzBox aus und nicht von dem anderen System. Es ist egal ob es SSHFS (fuse) auf dem anderen System gibt oder nicht gibt. Wenn Du es schaffst fuse auf die box zu bekommen, muss lediglich sftp auf dem anderen System vorhanden sein.
 
@sf3978

korrekt, genau so meine ich das!
Mein Beitrag davor sollte lediglich erklären, dass mein Problem nicht mit dem Problem des anderen Threads identisch ist, den Ralf erwähnt hat.

Also nochmal in kurzform:
Ich möchte von meiner Fritzbox mit Freetz ein anderes SSH System sicher mounten.
Dazu habe ich trotz Recherche und Bemühung der Suche keine Möglichkeit gefunden. Von der Suche halte ich viel, da man vllt sofort auf eine Lösung stößt, ohne erst eine Lösung finden zu müssen.

2.
Es gibt doch schon FUSE für Freetz (binary only). Darauf baut doch auch NTFS3G auf?

Danke und viele Grüße.
 
Mach mal folgendes:
Code:
make fuse-precompiled glib2-precompiled
Und ruf dein configure wieder auf. Ich glaube du musst vor dem configure noch den PKG_CONFIG_PATH setzen. In Freetz sieht das so aus:
Code:
PKG_CONFIG_PATH="$(TARGET_MAKE_PATH)/../lib/pkgconfig"
Die Variable musst du durch den Pfad zur Toolchain ersetzen.

MfG Oliver
 
Hab ich probiert, precompiled ist fehlerfrei durchgelaufen.

Code:
freetz@freetz-linux:~/sshfs-fuse-2.2$ PKG_CONFIG_PATH="$/home/freetz/freetz-trunk/toolchain/target/lib/pkgconfig"
freetz@freetz-linux:~/sshfs-fuse-2.2$ ./configure --build=i386-linux-gnu --target=mipsel-linux --host=mipsel-linux
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking for mipsel-linux-strip... mipsel-linux-strip
checking for mipsel-linux-gcc... mipsel-linux-gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... yes
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether mipsel-linux-gcc accepts -g... yes
checking for mipsel-linux-gcc option to accept ISO C89... none needed
checking for style of include used by make... GNU
checking dependency style of mipsel-linux-gcc... gcc3
checking whether mipsel-linux-gcc and cc understand -c and -o together... yes
checking for library containing dlsym... -ldl
checking OpenSSH version... 5.1 >= 4.4, disabling NODELAY workaround
checking for mipsel-linux-pkg-config... no
checking for pkg-config... /usr/bin/pkg-config
configure: WARNING: In the future, Autoconf will not detect cross-tools
whose name does not start with the host triplet.  If you think this
configuration is useful to you, please write to [email protected].
checking pkg-config is at least version 0.9.0... yes
checking for SSHFS... configure: error: Package requirements (fuse >= 2.2 glib-2.0 gthread-2.0) were not met:

No package 'fuse' found
No package 'glib-2.0' found
No package 'gthread-2.0' found

Consider adjusting the PKG_CONFIG_PATH environment variable if you
installed software in a non-standard prefix.

Alternatively, you may set the environment variables SSHFS_CFLAGS
and SSHFS_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details.

freetz@freetz-linux:~/sshfs-fuse-2.2$
 
Probier mal so:
Code:
PKG_CONFIG_PATH="/home/freetz/freetz-trunk/toolchain/target/lib/pkgconfig" ./configure --build=i386-linux-gnu --target=mipsel-linux --host=mipsel-linux
MfG Oliver
 
ja, das tut es:

Code:
freetz@freetz-linux:~/sshfs-fuse-2.2$ PKG_CONFIG_PATH="/home/freetz/freetz-trunk/toolchain/target/lib/pkgconfig" ./configure --build=i386-linux-gnu --target=mipsel-linux --host=mipsel-linux
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking for mipsel-linux-strip... no
checking for strip... strip
configure: WARNING: In the future, Autoconf will not detect cross-tools
whose name does not start with the host triplet.  If you think this
configuration is useful to you, please write to [email protected].
checking for mipsel-linux-gcc... no
checking for gcc... gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... yes
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking for style of include used by make... GNU
checking dependency style of gcc... gcc3
checking whether gcc and cc understand -c and -o together... yes
checking for library containing dlsym... -ldl
checking OpenSSH version... 5.1 >= 4.4, disabling NODELAY workaround
checking for mipsel-linux-pkg-config... no
checking for pkg-config... /usr/bin/pkg-config
checking pkg-config is at least version 0.9.0... yes
checking for SSHFS... yes
checking for fuse_opt_parse... no
configure: creating ./config.status
config.status: creating Makefile
config.status: creating config.h
config.status: executing depfiles commands
freetz@freetz-linux:~/sshfs-fuse-2.2$

ein darauffolgendes make bricht mit diesem Fehler ab:
Code:
freetz@freetz-linux:~/sshfs-fuse-2.2$ make
make  all-am
make[1]: Betrete Verzeichnis '/home/freetz/sshfs-fuse-2.2'
gcc  -g -O2 -Wall -W -Icompat   -o sshfs  sshfs-sshfs.o sshfs-cache.o sshfs-fuse_opt.o -pthread -L/home/freetz/freetz-trunk/toolchain/build/gcc-4.2.4-uClibc-0.9.29/mipsel-linux-uclibc/usr/lib -lfuse -ldl -lgthread-2.0 -lglib-2.0 -lintl
/usr/bin/ld: skipping incompatible /home/freetz/freetz-trunk/toolchain/build/gcc-4.2.4-uClibc-0.9.29/mipsel-linux-uclibc/usr/lib/libfuse.so when searching for -lfuse
/usr/bin/ld: skipping incompatible /home/freetz/freetz-trunk/toolchain/build/gcc-4.2.4-uClibc-0.9.29/mipsel-linux-uclibc/usr/lib/libfuse.a when searching for -lfuse
/usr/bin/ld: cannot find -lfuse
collect2: ld gab 1 als Ende-Status zurück
make[1]: *** [sshfs] Fehler 1
make[1]: Verlasse Verzeichnis '/home/freetz/sshfs-fuse-2.2'
make: *** [all] Fehler 2
freetz@freetz-linux:~/sshfs-fuse-2.2$

Dabei spielt es keine Rolle, ob ich davor PKG_CONFIG_PATH="/home/freetz/freetz-trunk/toolchain/target/lib/pkgconfig" oder export CC="mipsel-linux-gcc" setze.

Gruß
 
Hast du den mipsel-linux-gcc im Pfad? Ansonsten musst du den vollen Pfad setzen. Die CC Variable kannst du folgendermassen überschreiben: "make CC=mipsel-linux-gcc"

MfG Oliver
 
meinst du so?

Code:
freetz@freetz-linux:~/sshfs-fuse-2.2$ make CC=/home/freetz/freetz-trunk/toolchain/target/bin/mipsel-linux-gcc
make  all-am
make[1]: Betrete Verzeichnis '/home/freetz/sshfs-fuse-2.2'
/home/freetz/freetz-trunk/toolchain/target/bin/mipsel-linux-gcc  -g -O2 -Wall -W -Icompat   -o sshfs  sshfs-sshfs.o sshfs-cache.o sshfs-fuse_opt.o -pthread -L/home/freetz/freetz-trunk/toolchain/build/gcc-4.2.4-uClibc-0.9.29/mipsel-linux-uclibc/usr/lib -lfuse -ldl -lgthread-2.0 -lglib-2.0 -lintl
/home/freetz/freetz-trunk/toolchain/build/gcc-4.2.4-uClibc-0.9.29/mipsel-linux-uclibc/bin-ccache/../lib/gcc/mipsel-linux-uclibc/4.2.4/../../../../mipsel-linux-uclibc/bin/ld: sshfs-sshfs.o: Relocations in generic ELF (EM: 3)
/home/freetz/freetz-trunk/toolchain/build/gcc-4.2.4-uClibc-0.9.29/mipsel-linux-uclibc/bin-ccache/../lib/gcc/mipsel-linux-uclibc/4.2.4/../../../../mipsel-linux-uclibc/bin/ld: sshfs-sshfs.o: Relocations in generic ELF (EM: 3)
/home/freetz/freetz-trunk/toolchain/build/gcc-4.2.4-uClibc-0.9.29/mipsel-linux-uclibc/bin-ccache/../lib/gcc/mipsel-linux-uclibc/4.2.4/../../../../mipsel-linux-uclibc/bin/ld: sshfs-sshfs.o: Relocations in generic ELF (EM: 3)
/home/freetz/freetz-trunk/toolchain/build/gcc-4.2.4-uClibc-0.9.29/mipsel-linux-uclibc/bin-ccache/../lib/gcc/mipsel-linux-uclibc/4.2.4/../../../../mipsel-linux-uclibc/bin/ld: sshfs-sshfs.o: Relocations in generic ELF (EM: 3)
/home/freetz/freetz-trunk/toolchain/build/gcc-4.2.4-uClibc-0.9.29/mipsel-linux-uclibc/bin-ccache/../lib/gcc/mipsel-linux-uclibc/4.2.4/../../../../mipsel-linux-uclibc/bin/ld: sshfs-sshfs.o: Relocations in generic ELF (EM: 3)
/home/freetz/freetz-trunk/toolchain/build/gcc-4.2.4-uClibc-0.9.29/mipsel-linux-uclibc/bin-ccache/../lib/gcc/mipsel-linux-uclibc/4.2.4/../../../../mipsel-linux-uclibc/bin/ld: sshfs-sshfs.o: Relocations in generic ELF (EM: 3)
/home/freetz/freetz-trunk/toolchain/build/gcc-4.2.4-uClibc-0.9.29/mipsel-linux-uclibc/bin-ccache/../lib/gcc/mipsel-linux-uclibc/4.2.4/../../../../mipsel-linux-uclibc/bin/ld: sshfs-sshfs.o: Relocations in generic ELF (EM: 3)
/home/freetz/freetz-trunk/toolchain/build/gcc-4.2.4-uClibc-0.9.29/mipsel-linux-uclibc/bin-ccache/../lib/gcc/mipsel-linux-uclibc/4.2.4/../../../../mipsel-linux-uclibc/bin/ld: sshfs-sshfs.o: Relocations in generic ELF (EM: 3)
sshfs-sshfs.o: could not read symbols: File in wrong format
collect2: ld returned 1 exit status
make[1]: *** [sshfs] Fehler 1
make[1]: Verlasse Verzeichnis '/home/freetz/sshfs-fuse-2.2'
make: *** [all] Fehler 2
freetz@freetz-linux:~/sshfs-fuse-2.2$

Gruß!
 
Ja, genau so.

MfG Oliver
 
dann kommt der oben genannte Fehler, :(.
 
make clean ???

MfG Oliver
 
klappt.

Baue gerade die sshfs in mein Image ein, jedoch hängt dann der ctlmgr, aber dafür ein eigener thread.

Probiere ich
Code:
/var/media/ftp/uStor01 # sshfs -d -p 2222 root@host:/var/tmp /var/
media/ftp/uStor01/tmp2
WARNING: Ignoring unknown argument '-x'
WARNING: Ignoring unknown argument '-a'
WARNING: Ignoring unknown argument '-oClearAllForwardings=yes'
WARNING: Ignoring unknown argument '-oPort=2222'
WARNING: Ignoring unknown argument '-2'
ssh: exited: Error connecting: No route to host
read: Connection reset by peer
/var/media/ftp/uStor01 #

Probiere ich einen ssh-Server auf Port 22 zu mounten geht das, allerdings ist der gemountete Ordner dann leer.

Im Anhang das sshfs Paket zum testen.
 

Anhänge

  • sshfs.tar.gz
    85.2 KB · Aufrufe: 7
Zuletzt bearbeitet:
Ich habe sshfs mal statisch kompiliert, da man ansonsten immer mit den benötigten libs hantieren muss. Empfehlenswert ist aber in jedem Fall noch FUSE in eurem Image, damit ihr ein verbundenes fs wieder ordnungsgemäß trennen könnt.

Anhang anzeigen sshfs.zip

Allerdings habe ich ein Problem. Ich kann nicht auf das gemountete Verzeichnis zugreifen.

Hier der debug:

root@twonky:/var/mod/root# /var/nas/Storage-01/addons/bin/sshfs [email protected]:/tmp /var/mod/root/sshfs/ -o debug,sshfs_debug
SSHFS version 2.3
executing <ssh> <-x> <-a> <-oClearAllForwardings=yes> <-2> <[email protected]> <-s> <sftp>
The authenticity of host '192.168.178.250 (192.168.178.250)' can't be established.
RSA key fingerprint is 09:63:29:aa:49:70:9f:93:d1:14:4d:e8:43:5a:2e:0e.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added '192.168.178.250' (RSA) to the list of known hosts.
[email protected]'s password:
Server version: 3
Extension: [email protected] <1>
Extension: [email protected] <2>
Extension: [email protected] <2>
unique: 1, opcode: INIT (26), nodeid: 0, insize: 56
INIT: 7.8
flags=0x00000003
max_readahead=0x00020000
INIT: 7.8
flags=0x00000001
max_readahead=0x00020000
max_write=0x00010000
unique: 1, error: 0 (Success), outsize: 40
unique: 2, opcode: ACCESS (34), nodeid: 1, insize: 48
ACCESS / 01
unique: 2, error: -89 (Function not implemented), outsize: 16
unique: 3, opcode: GETATTR (3), nodeid: 1, insize: 40
[00001] LSTAT
[00001] ATTRS 41bytes (3ms)
unique: 3, error: 0 (Success), outsize: 112

sent: 1 messages, 17 bytes
received: 1 messages, 41 bytes
rtt min/max/avg: 3ms/3ms/3ms
num connect: 1

Und die dazugehöhrigen aktionen:

root@twonky:/var/mod/root# cd sshfs
root@twonky:/var/mod/root/sshfs# ls
ls: .: Input/output error
root@twonky:/var/mod/root/sshfs# cd ..
root@twonky:/var/mod/root# fusermount -u /var/mod/root/sshfs

Leider hat der gute alte Google mir nicht geholfen. Kann hier jemand helfen???
 
Hallo,
ich suche auch nach einer Möglichkeit SSHFS auf meinem gefritzen W920 zum laufen zu bekommen.
Könnt Ihr mir sagen wie ich hier vorgehen muss um SSHFS zu benutzen?
Ich nehme mal an, dass ich es nicht einfach per start-freetz.sh mit in meine Speedport2Fritz Frimware einbauen kann :-(
Wäre echt klasse wenn hier jemand helfen könnte.
Ich kann mir schon vorstellen, das dieses Thema doch den einen oder anderen interessiert!
Vielen Dank.
 
Zuletzt bearbeitet:
Zuletzt bearbeitet:
Mittlerweile habe ich einen Patch erstellt, der im Freetz Trunk emthalten ist. Dort kannst due das Paket sshfs einfach auswählen.

Ah. Danke für die Info. Tatsächlich. Bei den Paketen unter testing gibt es SSHFS.
Dann werde ich mir mal eine neue Firmware backen, test und vielleicht klappt es ja.

Vielen Dank!
 
Anbindung als Netzlaufwerk

Hallöle,

ich möchte gerne eine gemountetes Verzeichnis (SSHFS mit Samba) als Netzlaufwerk auf meiner Windoof-Kiste einrichten. Per SSH Konsole bzw. Winscp kann ich als root problemlos auf das gemountete Verzeichnis zugreifen. Bloß mit Samba und Netzlaufwerkanbindung klappts irgendwie nicht. Das Verzeichnis ist unter \\192.168.1.1 (IP meiner Fritzbox) im Explorer sichtbar, aber ich kann einfach nicht darauf zugreifen.

Hat jemand eventuell eine Anleitung wie ich ohne FTP nur im lokalem Netz darauf zugreifen kann? Vielen Dank.

Grüße
Elso

Nach weiterem probieren habe ich es erstmal Testweise hinbekommen:

Eintrag unter Samba "Erweitert" im Freetz Webmin:

guest account = nobody
guest ok = yes
guest only = no
read only = no

[mypath]
path = /var/media/mypath
browseable = yes
read only = no
writable = yes
guest ok = yes
guest only = no
force create mode = 0777
 
Zuletzt bearbeitet:

Neueste Beiträge

Statistik des Forums

Themen
244,879
Beiträge
2,220,030
Mitglieder
371,604
Neuestes Mitglied
broekar
Holen Sie sich 3CX - völlig kostenlos!
Verbinden Sie Ihr Team und Ihre Kunden Telefonie Livechat Videokonferenzen

Gehostet oder selbst-verwaltet. Für bis zu 10 Nutzer dauerhaft kostenlos. Keine Kreditkartendetails erforderlich. Ohne Risiko testen.

3CX
Für diese E-Mail-Adresse besteht bereits ein 3CX-Konto. Sie werden zum Kundenportal weitergeleitet, wo Sie sich anmelden oder Ihr Passwort zurücksetzen können, falls Sie dieses vergessen haben.