e

There are many methods of sharing files between computers of various operating systems. I will add new methods every few days until you no longer see this message.

*nix host to *nix client using sshfs:

On the host:

sudo apt-get install openssh-server

On the client:

sudo apt-get install sshfs
sudo usermod -a -G fuse yourusername

You can then mount ssh locations to local mount points much as you would samba shares and nfs shares. For example:

mkdir ~/mysshfsshare
sshfs yourusername@hosts.ip.address:/home/yourusername ~/mysshfsshare

Two way communication:

If you want two-way communication, do the above changing which computer has the host role and which the client role.

Easy/Lazy Improvement:

To make things truly easy on yourself, enable passwordless ssh with RSA keys:

On host and guest, run the following command:

ssh-keygen -t rsa

Hit 'enter' for each prompt to set up your rsa key.

Then run these commands on the appropriate computer:

For the host:

ssh-copy-id -i ~/.ssh/id_pub.rsa yourusername@client.ip.address

For the client:

ssh-copy-id -i ~/.ssh/id_pub.rsa yourusername@client.ip.address

After this, you should be able to mount sshfs shares, sftp, and ssh between boxes without a password while maintaining encryption and security.

Filesharing the Windows way

You can share files between Bodhi and Windows using Samba.

Preparation

To get started, run the following command on your Bodhi computer:

sudo apt-get install bodhi-filesharing system-config-samba

Sharing files from Bodhi to Windows

The Bodhi side of things

Launch the Samba configuration utility by going to the menu → Applications → Preferences → Samba or using my favorite E doodad, the Everything Launcher and just type Samba.

Add whatever shares you want to. Set the access as you like. Then you need to set samba passwords for the accounts you plan on using.

sudo smbpasswd yourusername

You can use the same password as your Linux login. Syncing the two is possible, but beyond the minimal scope of this document.

The Windows side of things

From your Windows computer, right-click Computer and choose “Map network drive.” Enter \\ip.address.of.bodhi\sharename in the location box, eg. \\10.10.10.10\username. Choose a drive letter that suits your fancy. Choose “Connect using different credentials.” Enter your Bodhi login and password. Save the credentials if you wish. Hit Finish and voilà, you should have a network drive accessing files on your Bodhi machine.

Sharing from Windows to Bodhi

Assuming you have a Windows share named “SharedFiles” on the windows box, use the following command to access it from Bodhi:

sudo mount -t cifs -o username=winusername //ip.address.of.windows/SharedFiles /media/location-to-mount-to

You should now be able to access your windows files by going to /media/location-to-mount-to in the command line or your favorite file browser.

 
howto_filesharing.txt · Last modified: 2012/02/09 11:58 by tristam · [Old revisions]


© Copyright Bodhi Linux 2012. All Rights Reserved - Hosted by vaultnetworks