Translation


by Transposh

Posts Tagged ‘OpenSSH’

Networking Ubuntu PCs with SSHFS

Sunday, October 18th, 2009

Two PCs that are both running on Ubuntu can share files in a number of ways. We use USB devices & swap them to synchronize files between two PCs in what was called a ‘sneaker network‘. One better way is to use an SSHFS or ‘Secure Shell File System’ network.

SSHFS uses OpenSSH to provide secure communication between PC’s/With the network connected the local PC user will be able to transfer,open as well as edit files on the remote PC as if they were on his own machine. The remote files will look and act just like the files on the local PC

To create an SSHFS network all you need are two PCs connected to the same router or gateway. Ubuntu comes with most of the software to make this work, but needs two applications available in the repositories to be initialized on both PCs. Here is how to set it up:

  1. From System>Administration>Synaptic Package Manager install the following packages: sshfs and openssh-server
  2. Also in Synaptic, confirm that openssh-client is installed(usually comes with Ubuntu)
  3. Go to System Administration>Users and Groups>unlock>Manage Groups, confirm on Fuse group
  4. Create an empty folder in your home directory

That completes the installation of the networking tools. To activate the network from one PC to the other,you just have to invoke SSHFS and indicate where the files are coming from, and where they are going to be displayed (that the new folder you made)

Go to Applications>Accessories>Terminal & enter:

1
 sshfs remoteusername@remotepc:/home/remoteusername ~/newfolder

Once you supply the password for remote PC (their password, not yours) which indicates that you have permission to access it, and for the first time only, confirm the other PC, then the network will be established and an icon will be displayed on your desktop. You will be able to access the other user’s home directory by simply clicking on that ‘newfolder’ icon in your home director.You can then copy,move,edit and delete as if they were on your PC. Password protected documents will, of course remain password protected.
To disconnect your PC from the network, enter in the terminal:

1
fusermount -u ~/newfolder