Link to home
Start Free TrialLog in
Avatar of yarekGmail
yarekGmail

asked on

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 ?


Avatar of torimar
torimar
Flag of Germany image

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.
Avatar of Jayachandran Palanisamy
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
Avatar of Kerem ERSOY
Kerem ERSOY

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.
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.
ASKER CERTIFIED SOLUTION
Avatar of stephenhoekstra
stephenhoekstra
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial