Transferring files between boxes
I'm trying to transfer my data files from one computer to another. Since the older machine lacks a means of mass storage, I've bought an ethernet cable, and am hoping I can get them to network.
The older box is Fedora Core 5, while the newer one is Slackware 10.2. About the only thing I know here is that I need the ethernet cable (and the ethernet cards, I have those too), so feel free to include details that 'anybody should know'. |
If you don't have a hub or switch, then you need a crossover ethernet cable. If the hosts are not next to each other and you don't want to go out and buy a 25 or 50 ft crossover cable, you can buy a shorter one and an ethernet extension adaptor.
You could either set up a networking share, using NFS or samba, or you could use the sftp program. For that you need to set up ssh which is easier than setting up a ftp server. |
Supposing you already have the crossover cable to connect both machines, you need to see if both machines have their ethernet interfaces configured in the same network.
You need to enter the command "ifconfig eth0" on both machines; the answer will be something like above: Code:
eth0 Link encap:Ethernet HWaddr 00:14:2A:D6:CC:C6 If you don't have it on this condition, you can setup the network with the above commands, one for each machine: Code:
# Machine A When the configurations seem Ok, you can ping each other to see if the machines are really connected: Code:
# Machine A Code:
PING 192.168.0.2 (192.168.0.2) 56(84) bytes of data. Now you need some kind of remote shell in both machines, like ssh or rsh. I don't want to setup flames here, but for a local network, I prefer rsh; however, you should already have ssh installed on both machines; you need at least one with ssh which is the client and the other with sshd, the ssh server. You can check if both are installed with the command: Code:
which ssh To check if the connection is working, from one machine, open a session on the other: Code:
# Machine A All right, now we can think on the transfer issues. You can use scp, which comes with ssh. There are other utilities and forms to do the transfer over the ssh but I guess that scp is enough for now. The command will be: scp <file name> <user name>@192.168.0.2:/<directory name>/ scp will ask the password before transfer the file. |
Good advice so far. But once you have the connection working, if you're running KDE, there's a neat protocol built into konqueror - fish which gives you a neat graphical way of moving files between machines.
Put the following in your konqueror location bar and press return: fish://username@addy.of.other.machine and off you go! You can drag & drop files between machines as easily as you can between directories on your own machine. Edit: Note that for fish to work, you need to have ssh running! HTH |
can't get ssh to work
Want to transfer files from a Fedora Core 5 desktop (address 192.168.1.3 and the user-name: jb) to a Suse 10.2 laptop (192.168.1.4, jim). Connect with a crossover cable. Same broadcast: 192.168.1.255.
Ping works from the laptop but ssh cannot connect: # ping 192.168.1.3 PING 192.168.1.3 (192.168.1.3) 56(84) bytes of data. 64 bytes from 192.168.1.3: icmp_seq=1 ttl=64 time=0.163 ms 64 bytes from 192.168.1.3: icmp_seq=2 ttl=64 time=0.180 ms 64 bytes from 192.168.1.3: icmp_seq=3 ttl=64 time=0.179 ms --- 192.168.1.3 ping statistics --- 3 packets transmitted, 3 received, 0% packet loss, time 2000ms rtt min/avg/max/mdev = 0.163/0.174/0.180/0.007 ms # ssh jb@192.168.1.3 ssh: connect to host 192.168.1.3 port 22: No route to host From the desktop can also ping, but then hangs: #ssh: connect to host 192.168.1.4 port 22: Connection timed out ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Diagnostics: On laptop: # nmap -T5 -sV localhost Starting Nmap 4.11 ( http://www.insecure.org/nmap/ ) at 2006-12-17 13:02 MST Interesting ports on localhost (127.0.0.1): Not shown: 1675 closed ports PORT STATE SERVICE VERSION 22/tcp open ssh OpenSSH 4.4 (protocol 1.99) 25/tcp open smtp Postfix smtpd 111/tcp open rpc 631/tcp open ipp CUPS 1.2 6000/tcp open X11 (access denied) Service Info: Host: linux-arizona.site; OS: Unix Nmap finished: 1 IP address (1 host up) scanned in 6.270 seconds # /sbin/route -n Kernel IP routing table Destination Gateway Genmask Flags Metric Ref Use Iface 192.168.1.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0 127.0.0.0 0.0.0.0 255.0.0.0 U 0 0 0 lo # ps aux | grep sshd root 3619 0.0 0.1 53460 1528 ? Ss Dec16 0:00 /usr/sbin/sshd -o PidFile=/var/run/sshd.init.pid root 9721 0.0 0.0 5008 796 pts/0 S+ 13:10 0:00 grep sshd On the desktop, nmap shows port 22 is also open: 22/tcp open ssh OpenSSH 4.4 (protocol 2.0) # /sbin/route -n Kernel IP routing table Destination Gateway Genmask Flags Metric Ref Use Iface 192.168.1.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0 169.254.0.0 0.0.0.0 255.255.0.0 U 0 0 0 eth0 0.0.0.0 192.168.1.1 0.0.0.0 UG 0 0 0 eth0 # ps aux | grep sshd root 2255 0.0 0.1 4976 1108 ? Ss 02:04 0:00 /usr/sbin/sshd root 25016 0.0 0.0 3916 656 pts/0 R+ 13:11 0:00 grep sshd |
OK - got it working. One thing about that Suse firewall: it does work !
Thanks for advice, using fish in the konqueror location bar helps tremendously. :-) |
All times are GMT -5. The time now is 10:16 PM. |