Tiny Core Linux
Tiny Core Extensions => TCE News => TCE 2.x => Topic started by: Jason W on May 30, 2009, 07:58:36 AM
-
Thanks to combo3 for sshfs-fuse-2.2:
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
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
-
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
-
tried to delete the content of ~/.ssh/known-hosts and reconnect, but it hangs. Connecting through ssh only works
-
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.
-
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
-
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.
-
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.
-
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
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.)
-
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
-
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