LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (http://www.linuxquestions.org/questions/linux-networking-3/)
-   -   How to set up very simple 2 laptop wifi network to just send files between them ? (http://www.linuxquestions.org/questions/linux-networking-3/how-to-set-up-very-simple-2-laptop-wifi-network-to-just-send-files-between-them-4175433356/)

davetesc 10-21-2012 10:55 AM

How to set up very simple 2 laptop wifi network to just send files between them ?
 
Just trying to send files between two laptops over a wifi link. One laptop running Mint debian xfce, the other running mythbuntu xfce ( ubuntu ) both seem to have working wifi just don't know how to set up a network between them and send files ??? I connect to the internet using a mobile broadband dongle so don't need internet sharing etc.

SecretCode 10-21-2012 11:44 AM

I think firstly it would be simpler to buy a wifi access point / router from a computer store. 20-30 for a basic one.

If that's not an option, I think you need to set up one of the machines as an access point, via mode "Master" or mode "ap" depending on the specific wifi card installed. You may get some useful hints in Build A Linux-Based Wireless Access Point or Create a secure Linux-based wireless access point | Linux.com - otherwise search for articles using similar terms.

suicidaleggroll 10-21-2012 11:46 AM

If possible, it would be much easier to just hook up a network cable between the two machines and set them both up with a static IP. Even easier than that would be to use a wifi router like SecretCode said.

bmarx 10-21-2012 11:59 AM

If your wireless card supports it, may want to try an ad-hoc network:

https://help.ubuntu.com/community/WifiDocs/Adhoc

davetesc 11-15-2012 01:28 PM

Thanks for your tips, as I am running this project on -0 budget buying router not best option especially as don't have phone line or broadband but other tips helped, now have a link / network between both laptops and can ping back and forth using ip addr but not domain names but to be honest am in new territory, what do I do next to send actual files from one laptop to another???

michaelk 11-15-2012 01:57 PM

There are many ways to transfer files and in most cases this involves a server/client architecture i.e. ftp, sftp, SMB (samba), sshfs, nfs ...
If you do not know what type of services are currently running and/or do not want to mess with setting one up here is something that is almost foolproof and perfect for your setup. python should already be installed and so you run woof on the computer with the files you want to transfer. The port should be > 1024 i.e. 8080. You can then use the web browser on the other computer using the same port i.e. /other.pc.ip.address:8080 and a popup window will automatically be displayed to download your file(s).

If a firewall is running on either PC make sure it allows traffic on the port you selected.

http://www.home.unix-ag.org/simon/woof.html

davetesc 11-15-2012 02:14 PM

Thank you Michaelk, I found and discarded woof because I just want a simple "send to>>" type thing but I will give your tips a go when I can and go from there> Thank you again Dave

michaelk 11-15-2012 03:00 PM

Just a suggestion. If a ftp or ssh server is already installed and running then it is almost as simple as send to >>.

suicidaleggroll 11-16-2012 09:08 AM

I typically just use scp. SSH is installed by default on every Linux distro I've ever used, and most of the time the SSHD server is already running as well. In that case you can just
Code:

scp /path/to/file user@IP:/path/to/destination/
If the SSHD server is not already running, you can fire it up very easily.

suicidaleggroll 11-16-2012 09:10 AM

Quote:

Originally Posted by davetesc (Post 4830230)
now have a link / network between both laptops and can ping back and forth using ip addr but not domain names

You just need to set up entries for the machines in the /etc/hosts file on each one.

agentsteel 11-17-2012 10:20 AM

you could use this software to transfer files : Duckto

http://www.msec.it/blog/?page_id=11

or similar program, D-Lan

http://www.d-lan.net/home.html&lang=en

(haven't tested these myself yet)

davetesc 11-27-2012 05:36 PM

Thanks for all the tips, so far have managed to ping using ip addrs and thanks to tip about editing hosts can now ping using hostnames . I am sure this should be a simple thing to do but can't get any further. Tried gftp etc and just get connection refused even with firewalls disabled, not sure if it makes a difference but it seems to be using port 21 or 22 ???
Any suggestions happily received.
Thanks Davetesc.

suicidaleggroll 11-27-2012 06:08 PM

Are you running an ftp server on the machine? If not, then you can't connect to it with an ftp client.

As I said above, I typically just use SCP for file transfer between two Linux machines. The SSHD server is already installed and configured on 99.9999% (approximate number) of Linux distros, so it's trivially easy to use.

jschiwal 11-27-2012 06:17 PM

You need to configure SSH, start the sshd server and open port 22 before using it. Do you have a mobile dongle for each?
Does each laptop have an independent Internet connection? If your connection is across the Internet instead of on a LAN, then you want to re-enable the firewalls and use a secure protocol like ssh to transfer files.

Open port 22 for SSH.
Run "ssh-keygen" to generate a key pair in ~/ssh/. You can accept the defaults.
Edit /etc/ssh/sshd_config. Add the line: AllowUsers your_username. You could also to use keys instead of a password for logging in, but this isn't necessary.
Start the sshd service. You might want to enable it to start when you boot.

Now you can use scp or sftp to transfer files. The file browser can even open a window using sftp.
If you use Nautilus, select File -> Connect To Server. Enter the host name of the other computer.

Later, you can simply click on the Computer Icon at the top of Nautilus and then open the SFTP icon for the server.
Even your "Send to..." will have an option to send a file to the sftp folder.

michaelk 11-27-2012 06:31 PM

Typically ftp uses port 21 and ssh uses port 22. Whatever protocol you decide to use you need install the server if necessary and then start it on one of the computers. You would then run the client gftp on the other computer.

Here are the instructions for installing a ftp server on mint and ubuntu.
http://www.jonathanmoeller.com/screed/?p=3947
http://www.cyberciti.biz/faq/ubuntu-...ervice-server/

or ssh
http://www.jonathanmoeller.com/screed/?p=3675
http://www.cyberciti.biz/faq/ubuntu-...configuration/


All times are GMT -5. The time now is 02:54 AM.