I want to upload a file from my Linux server to some FTP server.
I know we use put
and get
commands to upload and download files and the sftp
command to connect to the FTP server.
But I wanted to do all this in one shell script and I have no idea how to connect to FTP using the sftp
command within some script to upload some file.
This is what I know but I don't know how it will work inside one sh script.
sftp -v -oIdentityFile=path user@server
put localPath ftpPath
Can anyone help me?
sftp
command is not for connecting toftp
, it's for connecting tosftp
which serves a similar purpose but is not the same protocol. – jordanm Dec 18 '13 at 03:57ftp
connection orsftp
? does are two very different protocol – Kiwy Apr 07 '14 at 11:54