1 / 3
Caption Text
2 / 3
Caption Two
3 / 3
Caption Three margin testing

Monday, October 12, 2009

Share files between 2 ubuntu computers with SSH

Share files between 2 ubuntu computers « Linux Owns

If you have two computers running Ubuntu on the same network, it could be an good idea to use openssh to share files between them.

The setup shouldn't take more than 2 minutes.

updated for Ibex.

On all the computers you want to share files with copy/paste the following command.

Ubuntu 8.04:

sudo apt-get install openssh-server openssh-client

Ubuntu 8.10:

sudo apt-get install ssh

Then you need to figure out the ip of each the computer you want to connect to.

Most of the time it's something like 192.168.1.2 or something in that line.

(kde, cli and another option is presented in bottom of thread)

Right-click the network-manager applet on the top panel and choose "connection information" to find it out.

On the computer you want to access the files from, go to "Places -> Connect to Server".

You'll get greeted by this window.

Service type should be "SSH""

Server should be the "ip" adress of the pc where the info is on.

Port, enter "22″

Pick the folder you wish to share (could take some time to connect depending on the size of the folder).

The user name of the pc you are connected to

The bookmark will be the name of the folder in nautilus

After that you'll get a windows where you have to enter a password. That would be the password of the pc you are trying to connect to.

And that's it.

You should have read/write permissions.

You can also connect to your Ubuntu pc running openssh from windows using "Putty" or from OSX using "Fugu". It should work the other way around too.

Note: It might be a good ideo to turn of root logins (for security reasons).

In a terminal

sudo gedit /etc/ssh/sshd_config

Change the line "PermitRootLogin yes" to "PermitRootLogin no".

————–

This won't be possible for all people (for instance when you use fluxbox), then you could try the things below here or just use "gftp". It has an easy to use UI.

————–

If you are using Kubuntu, you can connect to the ssh server using konqueror.

Just type

fish://user@server/path/to/folder

So in reality it could something like this

fish://rw@localhost/home/rw

This would bring you to the /home of the server.

or

fish://rw@192.168.1.3/

This would bring you to / of the server.

If you are on fluxbox, openbox, … nautilus won't be able to handle ssh (or smb). You could still use konqueror but you most likely won't like that.

Then you could use the cli client of you choice and do

ssh user@server

For me this would be:

ssh rw@192.168.1.3

And you would be able to browse the server using the terminal.

Some basic terminal commands are given here.

However, you could use sshfs to mount the the ssh share as a filesystem.

There are instructions to get it working on the official website, but ubuntu.wordpress.com has a nice how-to.

No comments:

Post a Comment

Featured Post

Windows和Ubuntu双系统完全独立的安装方法

http://www.ubuntuhome.com/windows-and-ubuntu-install.html  | Ubuntu Home Posted by Snow on 2012/06/25 安装Windows和Ubuntu双系统时,很多人喜欢先安装windows,然...