How do I transfer data between Ubuntu and CentOS using LAN cable, in the same network? I tried installing Samba which did not go well in CentOS.
3 Answers
The easiest would be to set up SSH and use SCP. If you are transferring files to the CentOS server, do the following:
On CentOS:
sudo yum -y install openssh-server openssh-clients sudo chkconfig sshd on sudo service sshd start From the Ubuntu box, run:
scp sourcefile.txt [email protected]:/target/directory/ - Ubuntu desktop says
ssh_exchange_identification: read: Connection reset by peer lost connectionCorleone– Corleone2014-05-04 12:23:23 +00:00Commented May 4, 2014 at 12:23
4
-
rsyncrequires that arsyncserver is installed on one of the servers.Ouki– Ouki2014-05-02 09:19:30 +00:00Commented May 2, 2014 at 9:19 -
rsyncrequires indeed that it is installed on both hosts. Howeverrsynccan make use the SSH connection for the transfer.Jimmy Thrasibule– Jimmy Thrasibule2014-05-02 09:20:55 +00:00Commented May 2, 2014 at 9:20 - 2
rsyncdoes not require using rsync server. Only the normalrsyncclient is enough.rsync -e ssh source username@destination:pathis the syntax for RSync over SSH.Tero Kilkanen– Tero Kilkanen2014-05-02 09:21:18 +00:00Commented May 2, 2014 at 9:21 - @Spack & Tero Kilkanen: thanks. I always used rsyncd by the pastOuki– Ouki2014-05-02 09:27:44 +00:00Commented May 2, 2014 at 9:27
Open a shell on the destination host and type:
~# nc -v -v -l -n -p 2222 > file.out Now open a shell on you sender host and type the following commands:
~# pv -t -r -a -b /dev/zero | nc -v -v -n DESTINATION_IP_HERE 2222 < file.in - 1While this might work - I think it's doing it the hard way.EightBitTony– EightBitTony2014-05-02 10:31:24 +00:00Commented May 2, 2014 at 10:31
ssh?sftporscp.scp....@Ouki