linux ssh : send file through FTP

Hello experts
My system makes a backup of my database every day. (

My goal is to automatically transmit this file to another server through FTP (using an SSH command that will be exceuted afetr backup is done)

Can someone tell me if such thing is possible ?

Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

FTP and SSH are different protocols.

If you need to send your file via FTP for some reason (not recommended, since not secure) you will have to use the FTP command:

But if there is a SSH connection anyways, consider using the SCP command ( ) which is a part of the SSH suite and hence available wherever there is SSH.
Jayachandran PalanisamyTechnical Consultant - LinuxCommented:
You can transfer that backup file( from your server to another server using a simple way(scp or rsync).
scp user@remoteserver_IP:/path/of/remoteserver

Open in new window

add the source server to ssh passwordless authentication entry on remote server(check this URL:

Else you can achieve this through sftp(secure ftp how to:

Kerem ERSOYPresidentCommented:

Do you want to use FTP explicitly? Otherwise you can use SCP (file transfer over SSH). Becasue it is not possible to send a file over FTP using SSH. though you can use SCP ovver SSH.
The Ultimate Tool Kit for Technolgy Solution Provi

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy for valuable how-to assets including sample agreements, checklists, flowcharts, and more!

SFTP is a common method of file transfer over SSH.  It isn't technically FTP over SSH (which is possible but rare) but SFTP does all the same stuff as FTP.  The advantages of SFTP over FTP are 1) encryption and 2) it only uses one port (default 22) .  Meanwhile FTP uses separate ports for control channel and data channel.
Use ncftpput.
 ncftpput -u myusername -p mypassword /remote/directory


Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.