In the case of an FTP connection, you can simply create one Script task before the FTP task and set a password for it, for example
ConnectionManager FTPConn;
FTPConn = Dts.Connections ["FTP Connection Manager"];
FTPConn.Properties ["ServerPassword"] SetValue (FTPConn, Dts.Variables ["FtpPwd"] value.) ;.
and in the case of OLE DB, you can simply add the password to the OLEDB Connection connection string.
HARSHIT RATHORE
source share