LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 10-13-2005, 12:29 PM   #1
mushmaster
Member
 
Registered: Aug 2004
Location: USA - PA
Distribution: ubuntu
Posts: 63

Rep: Reputation: 15
connecting two machines


i need to get some files from a laptop to my desktop and i'd like to connect them directly. i've got some ethernet cables, and a router, if that's needed for some reason. i really just want to send data directly from one machine to the other. i know very little about networking but this seems like it *should* be a simple task. i can't find directions on how to do it though. how do i do this?
 
Old 10-13-2005, 01:30 PM   #2
linux.llama
Member
 
Registered: Oct 2005
Location: AZ
Distribution: Gentoo, Kubuntu, RHEL4.
Posts: 37

Rep: Reputation: 15
Hey
You'll need a crossover cable. The router is unnecessary. What OSes on each machine?
 
Old 10-13-2005, 01:41 PM   #3
Agrouf
Senior Member
 
Registered: Sep 2005
Location: France
Distribution: LFS
Posts: 1,596

Rep: Reputation: 80
Actually, the router can help it you don't have crossover cables.
You can use it as a switch.

If you have a crossover cable, plug it directly to both computers.
If you don't, plug 1 cable on each computer to the router.

Let say your NIC is eth0 on each computer
on first computer, do :
# ifconfig eth0 192.168.0.1 netmask ffffff00 up

on second computer, do
# ifconfig eth0 192.168.0.2 netmask ffffff00 up

test the network :
from computer 1, do ping 192.168.0.2, see if computer 2 responds.
from computer 2, do ping 192.168.0.1, see if computer 1 responds.

transfer the files :
Let say you want to transfer /home/dede/foo.txt from computer 1 to computer 2.
from computer 1, do :
$ ftp 192.168.0.2
> put foo.txt
 
Old 10-13-2005, 03:25 PM   #4
mushmaster
Member
 
Registered: Aug 2004
Location: USA - PA
Distribution: ubuntu
Posts: 63

Original Poster
Rep: Reputation: 15
" ifconfig eth0 192.168.0.1 netmask ffffff00 up"

when i do that i get "ffffff00: Host name lookup failure"
 
Old 10-13-2005, 05:47 PM   #5
ioerror
Member
 
Registered: Sep 2005
Location: Old Blighty
Distribution: Slackware, NetBSD
Posts: 536

Rep: Reputation: 34
Quote:
when i do that i get "ffffff00: Host name lookup failure"
Just tried that and I get the same result. Use dotted decimal "netmask 255.255.255.0".

Also, most routers will be setup themselves to be 192.168.0.1 so I'd suggest using 192.168.0.2 and 192.168.0.3.
 
Old 10-14-2005, 01:45 AM   #6
Agrouf
Senior Member
 
Registered: Sep 2005
Location: France
Distribution: LFS
Posts: 1,596

Rep: Reputation: 80
Sorry I didn't check the syntax.
All apologies.
 
Old 10-14-2005, 09:23 AM   #7
mushmaster
Member
 
Registered: Aug 2004
Location: USA - PA
Distribution: ubuntu
Posts: 63

Original Poster
Rep: Reputation: 15
ok, i do all that, and i can ping each machine from the other, but when i try to ftp, it says, "connection refused."
 
Old 10-14-2005, 09:48 AM   #8
makko
LQ Newbie
 
Registered: Apr 2004
Location: Earth
Distribution: Slackware 10, FreeBSD 4.10
Posts: 19

Rep: Reputation: 0
Enable an FTP server on the machine with the files you want to copy, then put those files in the root directory of the ftp server. If you've already done that then check your firewall.
 
Old 10-15-2005, 10:41 AM   #9
ioerror
Member
 
Registered: Sep 2005
Location: Old Blighty
Distribution: Slackware, NetBSD
Posts: 536

Rep: Reputation: 34
Quote:
ok, i do all that, and i can ping each machine from the other, but when i try to ftp, it says, "connection refused."
If you can ping them, then the network is working correctly. "connection refused" generally means that nothing is listening on the port you're trying to connect to. As makko says, it's just a question of enabling whatever services you need.

Ftp will do it, but depending on exactly what you want to do (general file sharing, backup etc), you might want to look at nfs, rsync and/or ssh/scp. Netcat (the comand is usually just called nc) will do in a pinch for an ad-hoc file transfer. If you want to mount each boxes filesystems and access them as if they were local, then nfs is generally the way to go.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Connecting 2 Linux machines ruh31 Linux - Networking 4 12-23-2004 02:04 AM
Help on connecting 2 linux machines over phone line fcalcada Linux - Networking 4 12-16-2003 12:03 PM
Connecting to Windows NT machines on LAN rgarg Linux - Networking 2 07-06-2003 11:20 PM
Win ME machines not connecting to server bobster666 Linux - Networking 7 03-04-2003 03:33 PM
connecting two machines vicente Linux - General 1 10-23-2001 07:33 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 08:23 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration