linux ssh : send file through FTP

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

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 ?


yarekGmailAsked:
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.

torimarCommented:
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: http://linux.about.com/od/commands/l/blcmdl1_ftp.htm

But if there is a SSH connection anyways, consider using the SCP command ( http://www.linuxtutorialblog.com/post/ssh-and-scp-howto-tips-tricks ) which is a part of the SSH suite and hence available wherever there is SSH.
0
Jayachandran PalanisamyTechnical Consultant - LinuxCommented:
Hi,
You can transfer that backup file(backup.zip) from your server to another server using a simple way(scp or rsync).
scp backup.zip 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: http://linuxproblem.org/art_9.html).

Else you can achieve this through sftp(secure ftp how to: http://www.brennan.id.au/16-Secure_Shell.html)

Thanks,
Jay
0
Kerem ERSOYPresidentCommented:
Hi,

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.
Cheers,
K.
0
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!

AlexPaceCommented:
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.
0
stephenhoekstraCommented:
Use ncftpput.
0
stephenhoekstraCommented:
 ncftpput -u myusername -p mypassword ftp.server.com /remote/directory filetoup.zip


0

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
Linux

From novice to tech pro — start learning today.