Author Topic: Desktop file sharing for people ...  (Read 21279 times)

0 Members and 1 Guest are viewing this topic.

Offline Mad Penguin

  • Administrator
  • Hero Member
  • *****
  • Posts: 1422
  • Karma: 10018
  • Gender: Male
    • View Profile
    • Linux in the UK
    • Awards
Desktop file sharing for people ...
« on: May 30, 2010, 02:54:22 pm »
Do you remember the good old days when you could set up drive shares between your Windows PC's and share files between machines? I do, and indeed more recently there's been all the fun of making SAMBA work between Windows and Linux so Linux PC's can also share those same files. Although not that difficult, generally it's a PITA and ultimately you just know that one day either a Windows Update or Linux distro update is going to upset the apple cart and you'll be configuring it all over again.

Still, good way to keep your skills up, eh?!

Anyway, for today's generation of "you know where you can stick your Windows box" where all you need is to share files between multiple Linux boxes, there are again a plethora of methods and invariably people will quote NFS without thinking too much. (or of course SAMBA) There are however alternatives, in particular I'm talking about SSHFS, which historically may have come across as a little obscure, but in combination with recent Gnome desktops is THE way to share files at a desktop level.

So how do we do that then?

Ok, well let's assume you have SSH running on all your boxes, typically this is what you're going to have running for the purposes of remote administration. If it's not running it's usually very easy to install - on Ubuntu or Mint for example you can do it through the GUI or from the command line;

Code: [Select]
apt-get install openssh-server

Once you have this running on a box, all you need is a username / password on the box, and everything is set up! (good eh?!)

So, to connect to a local machine on your network, in my example I'm going to use a machine with IP address 10.90.0.102 and because I never hit the wrong key, I'm going to use the root user.  ;)

Start Here :- First go to Places, and select Connect to Server, this should bring up a form that will ask you for details of where you want to connect to. See the image to the left do see the form filled in with the example details as outlined above.

What you should see then (you may have to wait a couple of seconds depending on your connection and the speed of your machines) is a file browser showing you the files available on the target machine.

What can I do with this?

You can drag and drop files between the target machine and your machine, and you can open files on this remote filesystem directly using any standard Gnome application.

Why is this really cool?

o It's works over local area networks AND over the Internet
o It's encrypted, so it's effectively a secure / VPN link
o Use the book mark option to effectively make the link persistent between reboots
o The only configuration required is listed above!

So if you need high performance file sharing and you have time on your hands, you will need to look at things like NFS, Samba (and dare I say 'gluster'). However, if you're looking for a more moderate / desktop experience without all the in depth tek, when these terms are mentioned, cover your ears and run away! These services are great, but technically complex and complete overkill!
« Last Edit: May 30, 2010, 02:58:42 pm by Mad Penguin »

Offline shtromm

  • Jr. Member
  • **
  • Posts: 55
  • Karma: 2
  • I've just joined!
    • View Profile
    • IT Consultants - IT consultant specialised in Free Software
    • Awards
Re: Desktop file sharing for people ...
« Reply #1 on: June 18, 2010, 03:15:00 pm »
An other way is via remote login with X-server forwarding (only recommended within a secure environment behind the firewall). Example here login from a box called "Gauis" onto a box called "Tiberius" and starting the KDE-desktop:

Code: [Select]
swen@gaius$ ssh -X tiberius
password:
Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
No mail.
Last login: Fri Jun 18 10:48:24 2010
swen@tiberius:~$ startkde

Note: The hostname tiberius must be know either via /etc/hosts (most simple) or via a local DNS. The X-Server must run on both boxes, but KDE shall be not running on gaius, otherwise KDE will not start. So login on gaius as "failsave" without starting the GUI for the user "swen".

 

Offline Mad Penguin

  • Administrator
  • Hero Member
  • *****
  • Posts: 1422
  • Karma: 10018
  • Gender: Male
    • View Profile
    • Linux in the UK
    • Awards
Re: Desktop file sharing for people ...
« Reply #2 on: June 18, 2010, 10:03:44 pm »
Ok, you might need to detail how file transfers take place in this context ... ??

(Your method looks good for "desktop sharing", but I'm lagging a little re; "desktop file sharing" ...)

Offline shtromm

  • Jr. Member
  • **
  • Posts: 55
  • Karma: 2
  • I've just joined!
    • View Profile
    • IT Consultants - IT consultant specialised in Free Software
    • Awards
Re: Desktop file sharing for people ...
« Reply #3 on: June 18, 2010, 11:12:11 pm »
You just need not file-transfer: The files are on central box and you work with one set of data.

For real file transfer, you can also also use scp from the shell, or setting an ftp-server (for which I see in a home/office environment little use).

Offline Mad Penguin

  • Administrator
  • Hero Member
  • *****
  • Posts: 1422
  • Karma: 10018
  • Gender: Male
    • View Profile
    • Linux in the UK
    • Awards
Re: Desktop file sharing for people ...
« Reply #4 on: June 19, 2010, 12:34:51 am »
Mmm, quite right .. but file-sharing was sort of the point of the article .. ;-)

.. obviously you wouldn't recommend shell scp for a desktop 'user'  ( :) ) , what would be involved in setting up an FTP server in this context (which is certainly an alternative as the method documented above also works for FTP) ..

It would be interesting to see how FTP compares to SSHFS  with regards to speed ...

Offline shtromm

  • Jr. Member
  • **
  • Posts: 55
  • Karma: 2
  • I've just joined!
    • View Profile
    • IT Consultants - IT consultant specialised in Free Software
    • Awards
Re: Desktop file sharing for people ...
« Reply #5 on: June 19, 2010, 05:38:49 pm »
It would be interesting to see how FTP compares to SSHFS  with regards to speed ...

I don't know: My first idea would be that it could be a tick slower, because all data are to be encrypted and decrypted, but with modern machines, that should be not a problem.

Anyway: I will run a small test case for a benchmark and will present here my results.

Offline shtromm

  • Jr. Member
  • **
  • Posts: 55
  • Karma: 2
  • I've just joined!
    • View Profile
    • IT Consultants - IT consultant specialised in Free Software
    • Awards
Re: Desktop file sharing for people ...
« Reply #6 on: June 19, 2010, 08:19:20 pm »
It would be interesting to see how FTP compares to SSHFS  with regards to speed ...


I don't know: My first idea would be that it could be a tick slower, because all data are to be encrypted and decrypted, but with modern machines, that should be not a problem.

Anyway: I will run a small test case for a benchmark and will present here my results.


I was wrong with my first idea: The transfer via ssh need roughly 50% of the time of a ftp transfer. A small report to find here (106 k):

http://sht-services.co.uk/Papers/Primitive.Benchmark.ssh-ftp-transfer.pdf

---

Some remarks:

1) Yes, I know my C looks Pascal (old love never dies) - it is anyway recycled code
2) Yes, I know I should not have my main data on ReiserFS, but with a Raid! it is relative safe, but I will switch soon to zfs
« Last Edit: June 20, 2010, 01:57:43 am by shtromm »

Offline Mad Penguin

  • Administrator
  • Hero Member
  • *****
  • Posts: 1422
  • Karma: 10018
  • Gender: Male
    • View Profile
    • Linux in the UK
    • Awards
Re: Desktop file sharing for people ...
« Reply #7 on: June 20, 2010, 04:16:50 am »
C? Pascal? My first question was going to be "what's wrong with bash?" ...  ;)

Offline shtromm

  • Jr. Member
  • **
  • Posts: 55
  • Karma: 2
  • I've just joined!
    • View Profile
    • IT Consultants - IT consultant specialised in Free Software
    • Awards
Re: Desktop file sharing for people ...
« Reply #8 on: June 20, 2010, 10:52:40 am »
C? Pascal? My first question was going to be "what's wrong with bash?" ...  ;)

There is nothing wrong with bash, and when I would had to start from the scratch, I would certainly wrote a shell script, in bash or csh, but I already wrote this little piece of software some years ago and recycling was just too logic and hence handy.
« Last Edit: June 20, 2010, 11:25:08 am by shtromm »

 


SimplePortal 2.3.3 © 2008-2010, SimplePortal