how to copy files from one linux mechine to other linux machine

i have two linux machine both have different distribution of linux on it
one had red hat and other have debian verasion
i ahve set up network between this
i ping  on  debian machine it is  finding  other machine
and then i gave command ftp the ip address of the other machine
it  said it is connect with that
after that i disconnected then i gave sane ftp comomand on the other machiune but it is not connected with the first one
so how i can connedt it
and how i can copy files from machine to other
help me
Who is Participating?
sunnycoderConnect With a Mentor Commented:
Hi deepakyadav,

> gave sane ftp comomand on the other machiune but it is not connected with the first one
The first one is not running the ftp server!! look for the configuration of the ftp server under /etc/xinet.d directory (most likely it will be vsftpd or wu-ftpd)

for copying the files you do not have to run ftp server on both the machines ... running the server on any one of them (your current configuration) is sufficient

after establishing an ftp session use get and mget commands to retrieve the files and put and mput commands to upload the files

you could use scp to beef up your security instead of running an ftp server
scp mylocalfile username@host:/dirname/file

Hi deepakyadav,

Are you sure the debian box has an ftp server set up? Try doing "ftp localhost" from the console on the debian machine to see if there actually is any server to connect to.
Hi Deepak !!!

                I think I have better idea (ya ya.. something lengthy process but u will definatly get the result out of it !!! )

                instead if FTP use NFS service..
                First start the nfs service on both m/c. then from your first m/c (say to second one (say /etc/exports....  type the file path (example u want to copy /use/local/mysql folder ...) then u will write in export file as :-


//save & exit...

          in your second m/c start nfs & portmap service & just give command as  
          #showmount -e
      it will give you that /usr/local/mysql is shared...for mounting

          #mount -t nfs  /dest.folder

          As u mount it on dest.folder copy it whatever u want...

           Try it.....
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.