Page 1 of 1

file transfer through ftp

Posted: 2021/06/10 07:44:35
by nitinkumar
hello,

I am learning linux. I have two centos 7 virtual machines configured. I want to transfer files between these two CentOS VM's.
To keep things simple, I log on both machines as root with same password. Both machines are pinging ( network established).
I have disabled firewall on both the machines. FTP package is installed on both machines and is running. But when I give
command ftp < ip address of other machine> I am getting error " connection refused". This is something to do with permissions.
But I am using root as a user then where is the problem? Where I am going wrong?

Re: file transfer through ftp

Posted: 2021/06/10 08:38:54
by TrevorH
To use ftp you would have to install, configure and run an ftp server. That is not part of the default install so you'd have to install it first.

What is part of the default install is ssh and its related utiilities like scp and sftp. Use one of those instead.

Re: file transfer through ftp

Posted: 2021/06/10 10:13:16
by jlehtone
I prefer rsync. It is part of default and does use ssh for the connection, just like scp and sftp.
See man rsync. (Its quite long manual.)

PS. The recommendation is to not log in as 'root'. Use regular accounts and use admin privileges only when absolutely necessary.

Re: file transfer through ftp

Posted: 2021/06/10 12:55:06
by nitinkumar
Thanks guys. I have successfully carried out file transfer between my two VM's. It was a great help.
thanks once again. Stay Home, stay safe.

Re: file transfer through ftp

Posted: 2021/06/10 13:11:56
by tunk
Just an addition: FTP is insecure and should not be used.
https://en.wikipedia.org/wiki/File_Tran ... l#Security