Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Maybe this is such an obvious question that it's a duplicate.

I have Ubuntu 10.10 on both my PC and Laptop. The Laptop connects to the Internet through a WiFi router. The PC connects to the same router with an Ethernet cable.

How can I safely share files between my PC and Laptop through this router? Do I have to change the router's config?

I'll need SSL as the WiFi is open at this moment, but I guess I can find info about that without a problem. Once I've done that, network printing should be easy :)

Edit Updated both to 11.10. Activated DHCP on the router to fix the IP addresses of both computers and the router now uses WPA2. I haven't been able to set up NFS between the computers, but I did achieve a safe FTP server connection.

share|improve this question
As Rax's answer says, as long as your WiFi connection is encrypted using WPA2, there's no immediate possibility of your file transfers being vulnerable. If you're really paranoid, you can SSH from one machine into the other and transfer your files using SFTP. – Oxwivi Jul 2 '11 at 8:59
@Oxwivi: In addition, if you're using UN*X-ish OS on both computers, I find SFTP the easiest to set up; reasonable off-the-shelf security is a bonus. – Piskvor Jul 8 '11 at 12:27
Why not Samba?.. – Andrejs Cainikovs Jan 7 '12 at 12:00
up vote 4 down vote accepted

On each computer install the ssh package.

Then you can mount the filesystem over SFTP (stands for Ssh File Transfer Protocol) in nautilus and copy that way just like you would between drives. To access files on the other computer, open nautilus and Clik the File -> Connect to server... menu. Pick ssh from the menu/list. Put in your username for the other computer and the IP for the other computer and click connect. It should ask for your password for the laptop username you put in and then it should show the files on the laptop. (You can do this in either direction.)

This method encrypts the whole thing both ways so it is safe even over open wifi (or if you use strong passwords) even over the internet. You can find out the IP of a computer by running ifconfig on it. It will give you something like this:

eth0      Link encap:Ethernet  HWaddr 00:11:11:9e:58:57  
          inet addr:  Bcast:  Mask:
          inet6 addr: 2001:2038:243:de16::f4d1/64 Scope:Global
          inet6 addr: fe80::237:41ff:fe9d:5237/64 Scope:Link
          RX packets:2874340 errors:0 dropped:0 overruns:0 frame:0
          TX packets:317014 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:348505532 (348.5 MB)  TX bytes:127490351 (127.4 MB)

lo        Link encap:Local Loopback  
          inet addr:  Mask:
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:68246 errors:0 dropped:0 overruns:0 frame:0
          TX packets:68246 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:35179159 (35.1 MB)  TX bytes:35179159 (35.1 MB) 

Look for a line that says 'inet addr:192.168.###.###' (that does not start with 127.0.) and that is the IP address. So for the example ifconfig output I listed, it would be This would be the address I would use to connect to the computer I ran ifconfig on.

share|improve this answer
Thanks, I'll give that a try, when I can :( – GUI Junkie Jul 8 '11 at 17:44
Works with filezilla, not with Nautilus (so far) – GUI Junkie Dec 17 '11 at 23:01
with the newer versions of nautilus, you also get to put the password in before you try connecting. Maybe that's the problem? – Azendale Dec 31 '11 at 17:55

For this you need sftp

Firstly install ssh on all three computers

sudo apt-get install openssh-server and find the ip of the computer using these commands:

sudo ifconfig | grep -o "inet addr:[0-9.]*" | cut -d ":" -f 2 | grep -v ^127

On the other computers do so in nautilus:



Click connect and bookmark it like this


Similarly do the same for the other machines use the bookmarks to nagivate the other computers

share|improve this answer
Works as described: thank you. Too bad that Ubuntu does not provide this out of the box; why do they keep focusing on Windows networking? – controlix Jan 8 '12 at 10:20
@controlix They do so, because most business networks are supposed to be Windows Compatible – Amith KK Jan 8 '12 at 10:51

Make your router use WPA2. That is described in its manual.

If that isn't what you meant, NFS between two Linux machines can probably help you.

share|improve this answer
I'm not using an encrypted wireless, as I'm sharing with others (the router and Internet connection are mine). I'll give the NFS a try even though there is no mention of routers... – GUI Junkie Jul 2 '11 at 15:56
Isn't NFS unencrypted? – Azendale Dec 18 '11 at 20:24

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.