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.
Asked
Active
Viewed 4,007 times
3 Answers
3
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/
mtak
- 1,274
- 10
- 13
-
Ubuntu desktop says `ssh_exchange_identification: read: Connection reset by peer lost connection ` – Corleone May 04 '14 at 12:23
1
Spack
- 1,987
- 1
- 17
- 18
-
`rsync` requires that a `rsync` server is installed on one of the servers. – Ouki May 02 '14 at 09:19
-
`rsync` requires indeed that it is installed on both hosts. However `rsync` can make use the SSH connection for the transfer. – Spack May 02 '14 at 09:20
-
2`rsync` does not require using rsync server. Only the normal `rsync` client is enough. `rsync -e ssh source username@destination:path` is the syntax for RSync over SSH. – Tero Kilkanen May 02 '14 at 09:21
-
1
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
Matt
- 111
- 2