Results 1 to 5 of 5
I am setting up a new computer, and wish to copy about 100 GB of data from my old computer. I have cat 5 cable, a cross over ethernet cable, ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
- 05-09-2012 #1
How to connect 2 computers in linux.
I am setting up a new computer, and wish to copy about 100 GB of data from my old computer. I have cat 5 cable, a cross over ethernet cable, and a cross over usb cable, and have ubuntu 10.04 on the old computer and Lubuntu 12.04 on the new computer. When I connect using either of the cross over cables, the computers do not see each other. What do I need to enable to be able to copy data from the old computer to the new one? I googled, but all the answers either pertained to windows, or just said to use linux, not how. Thanks for the help, I know it must be simple, but I'm not seeing it.
Registered Linux user #526930
- 05-09-2012 #2Trusted Penguin
- Join Date
- May 2011
- Posts
- 3,663
put both machines on the same local IP subnet, e.g.:
pc1: ifconfig eth0 192.168.1.1 netmask 255.255.255.0 up
pc2: ifconfig eth0 192.168.1.2 netmask 255.255.255.0 up
then connect them with the x-over cable. if you have a hub/switch, you could use that inb/t them, too. you might even be able to use the cat5 cable if the NICs are auto-switching, but don't rely on that. stick with either x/o or hub/switch.
then see if you can ping.
you don't need a default route.
make sure the link lights are on for both NICs. if you have ethtool, you can check if a link is detected, e.g.:
if you have firewalls on, you might want to turn them off.Code:ethtool eth0|grep -i link
then start up sshd, and you can use scp/sftp.
or use an FTP server like vsftpd.
- 05-09-2012 #3
I do this in the internet connection set up, right?
Does it matter which computer I ping from? And would that be from the command line, ping -r -I 255.255.255.0 ? or just ping since you saidthen connect them with the x-over cable. if you have a hub/switch, you could use that inb/t them, too. you might even be able to use the cat5 cable if the NICs are auto-switching, but don't rely on that. stick with either x/o or hub/switch.
then see if you can ping.
Would this be sudo service ssh start on the ubuntu machine (the ones with the files I want to transer) then sudo service ssh stop when I was done? Do I just need to do that on the one machine, or do I need to do it on both?you don't need a default route.
then start up sshd, and you can use scp/sftp.
or use an FTP server like vsftpd.
Thanks for the help, I really appreciate it.Registered Linux user #526930
- 05-09-2012 #4Trusted Penguin
- Join Date
- May 2011
- Posts
- 3,663
sorry, i was thinking in the terminal. you don't need to do it in the gui, but you could. i would just open a terminal, and do the ifconfig commands- using sudo too, forgot it is *buntu, e.g.:
that assumes your ethernet device is eth0, btw.Code:sudo ifconfig eth0 192.168.1.1 netmask 255.255.255.0 up
ping the ip address of one pc from the other, e.g.:Does it matter which computer I ping from? And would that be from the command line, ping -r -I 255.255.255.0 ? or just ping since you said
Code:# from pc1, ping pc2's ip address ping 192.168.1.2 # from pc2, ping pc1's ip address ping 192.168.1.1
you got it.Would this be sudo service ssh start on the ubuntu machine (the ones with the files I want to transer) then sudo service ssh stop when I was done?
yeah, you only need to start the service on the machine to which you will be connecting. it doesn't matter which side your files to copy reside on, b/c you can go either way. here's a couple examples:Do I just need to do that on the one machine, or do I need to do it on both?
Code:# from pc1, pull file residing on pc2 to pc1 [root@pc1 ~]# scp root@192.168.1.2:/path/to/file.zip . # from pc2, push file residing on pc2 to pc1 [root@pc2 ~]# scp /path/to/file.zip root@192.168.1.1:/tmp
npThanks for the help, I really appreciate it.
- 05-09-2012 #5
Thanks atreyu. That cleared up my confusion. I'm at work now, but will try it when I get home tomorrow.
Registered Linux user #526930




