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?
|
Hey
You'll need a crossover cable. The router is unnecessary. What OSes on each machine? |
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 |
" ifconfig eth0 192.168.0.1 netmask ffffff00 up"
when i do that i get "ffffff00: Host name lookup failure" |
Quote:
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. |
Sorry I didn't check the syntax.
All apologies. |
ok, i do all that, and i can ping each machine from the other, but when i try to ftp, it says, "connection refused."
|
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.
|
Quote:
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. |
All times are GMT -5. The time now is 09:08 PM. |