WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: sshfs-fuse-2.2  (Read 3820 times)

Offline Jason W

  • Administrator
  • Hero Member
  • *****
  • Posts: 9730
sshfs-fuse-2.2
« on: May 30, 2009, 04:58:36 AM »
Thanks to combo3 for sshfs-fuse-2.2:

Code: [Select]
Title:          sshfs-fuse-2.2.tce
Description:    File system client for SFTP (TESTING)
Allows you to mount a remote directory over SSH and
interact with the files as if they were local.
Version:        2.2
Author:         Miklos Szeredi
Original-site:  http://fuse.sourceforge.net/sshfs.html
Copying-policy: GPLv2
Size: 113K
Extension_by:   combo3
Comments:       Requires fuse.tcel  openssh.tce  openssl-0.9.8h.tcel
                This extension is PPI compatible
                ----------------------------------------------------
                Create a mountpoint in your home directory. Then
                mount the remote host with:
           
                $ sshfs hostname mountpoint

Example:
-------
$ mkdir /home/tc/work-pc
$ sshfs user@192.168.1.20:/home/user /home/tc/work-pc

Note:
----
When connecting to a host for the first time you will
be greeted with either:

- an authentication request, or
- a plain cursor

In both cases, just type in the word 'yes' and hit
enter to continue.

------------------------------------------------------
For more options use:

$ sshfs -h

------------------------------------------------------
usr/local/bin/sshfs
usr/local/share/man/man1/sshfs.1

Change-log:     ----------
Current:        2009/05/27 First Version


Code: [Select]
Title:          sshfs-fuse-2.2.tcz
Description:    File system client for SFTP (TESTING)
Allows you to mount a remote directory over SSH and
interact with the files as if they were local.
Version:        2.2
Author:         Miklos Szeredi
Original-site:  http://fuse.sourceforge.net/sshfs.html
Copying-policy: GPLv2
Size: 480K
Extension_by:   combo3
Comments:       Requires fuse.tczl  openssh.tcz  openssl-0.9.8h.tczl
                This extension is PPI compatible
                ----------------------------------------------------
                Create a mountpoint in your home directory. Then
                mount the remote host with:
               
$ sshfs hostname mountpoint

Example:
-------
$ mkdir /home/tc/work-pc
$ sshfs user@192.168.1.20:/home/user /home/tc/work-pc

Note:
----
When connecting to a host for the first time you will
be greeted with either:

- an authentication request, or
- a plain cursor

In both cases, just type in the word 'yes' and hit
enter to continue.

------------------------------------------------------
For more options use:

$ sshfs -h

------------------------------------------------------
usr/local/bin/sshfs
usr/local/share/man/man1/sshfs.1

Change-log:     ----------
Current:        2009/05/27 First Version


Offline alu

  • Sr. Member
  • ****
  • Posts: 429
Re: sshfs-fuse-2.2
« Reply #1 on: December 20, 2009, 09:25:29 AM »
when i try to mount a remote folder, i get:

sshfs mount user@ip-address:mnt/sda1/folder /home/tc/mountpoint
user@ip-address's password:

remote host has disconnected

Offline alu

  • Sr. Member
  • ****
  • Posts: 429
Re: sshfs-fuse-2.2
« Reply #2 on: December 20, 2009, 09:44:00 AM »
tried to delete the content of ~/.ssh/known-hosts and reconnect, but it hangs. Connecting through ssh only works

Offline vitex

  • Full Member
  • ***
  • Posts: 113
Re: sshfs-fuse-2.2
« Reply #3 on: December 20, 2009, 10:16:53 AM »
Have you installed openssh.tcz as mentioned in the info file (but not in the dependency file) of sshfs-fuse-2.2?  sshfs works for me on MC with openssh but not with dropbear when I access a file system on a Ubuntu system running sshd from openssh.

Similarly, using sshfs on a remote system to access a TC/MC file system requires openssh installed and running sshd on the TC/MC system.

Offline alu

  • Sr. Member
  • ****
  • Posts: 429
Re: sshfs-fuse-2.2
« Reply #4 on: December 20, 2009, 10:48:49 AM »
thanks,it might be that since i probably read the info file too quickly believing that i needed openssl instead of openssh; however, i still have difficulties to reach my shared disks with either ssh or ftp: it seems that all sysmlinks created on the server-side are not shown active when i want to use them from the client side.

F.ex.: i created a ln -s /mnt/sda1 /home/tc on the server as user tc through ssh which worked, and i can get in it from the client side via ssh; but if i try to use ftp in order to reach the ~sda1 directory in /home/tc with mc of ftp on the command line, mc shows me:

!sda1

and ftp says that i can't get into /home/tc/sda1

i don't know what to do

Offline gerald_clark

  • TinyCore Moderator
  • Hero Member
  • *****
  • Posts: 4254
Re: sshfs-fuse-2.2
« Reply #5 on: December 20, 2009, 11:01:41 AM »
Symlinks have to resolve relative to the client.
It ok to use symlinks on your machine that point to another machine,
but it is best to not to try to use symlinks from another machine.
They won't be pointing to anything that exists relative to your machine.

Offline alu

  • Sr. Member
  • ****
  • Posts: 429
Re: sshfs-fuse-2.2
« Reply #6 on: December 20, 2009, 11:10:37 AM »
i don't know if i understand right what you tell me, but i applied this kind of symlinkage several times in the past with other systems (debian f.ex.), and i never had a problem; and about the core of your argument, if you symlink a directory from a mountpoint to another one within the same tree within the same machine, you can access this second mountpoint per ftp or ssh from any client you would use; this also for security reason very good.

Offline vitex

  • Full Member
  • ***
  • Posts: 113
Re: sshfs-fuse-2.2
« Reply #7 on: December 20, 2009, 11:41:45 AM »
You lost me with "ftp" and "ln" commands.

If you still want to mount the directory /mnt/sda1/folder that resides at ip-address so it is accessible as the directory /home/tc/mountpoint on TC, the proper command is
Code: [Select]
sshfs user@ip-address:/mnt/sda1/folder /home/tc/mountpoint
The following steps work for me on TC/MC to access a directory on a remote server:

* Boot microcore-2.7 or tinycore-2.7
* tce-load -w -i openssh.tcz
* tce-load -w -i sshfs-fuse-2.2.tcz
* mkdir /tmp/sshfs
* sshfs user@server:/path/to/directory/on/server  /tmp/sshfs
* ls -l /tmp/sshfs

You should see a listing of the directory that resides on the server. 

Accesses to /tmp/sshfs on MC will now be connected via ssh to the specified directory on "server", which you can access with the rights of "user".

(Use "fusermount -u /tmp/sshfs" if you need to unmount the directory and break the ssh connection to the server.)

Offline alu

  • Sr. Member
  • ****
  • Posts: 429
Re: sshfs-fuse-2.2
« Reply #8 on: December 20, 2009, 11:52:34 AM »
i have got it guys:

on the server side:

1. ftp doesn't follow symlinks outside the user's jail; i forgot it, that is the point; so no symlink, just mount what you want in the user's jail;
2. so say, we have created a user xyz on the server side into /home, and we want to share a usb-hdd mounted on /mnt/sda1;
3. create a directory within /home/xyz with the same name of the usb-hdd which you want to share: sudo mkdir /home/xyz/sda1; give the right permissions for your user xyz;
4. mount your directory: sudo mount /mnt/sda1 /home/xyz/sda1 (i use the options nouser,noauto,umask=002)
5. umount your directory: sudo umount /home/xyz/sda1.

that's it

Offline alu

  • Sr. Member
  • ****
  • Posts: 429
Re: sshfs-fuse-2.2
« Reply #9 on: December 20, 2009, 12:10:27 PM »
thanks vitex, it seems that i have to disable dropbear first in order for openssh to be activated as ssh server, i shall try that, but it should work without problem