Due to security reasons my company is planing to modify all scripts that uses FTP to SCP. I see some documents in the web about scp but not very helpful in my case. My problem is this. My username and pwd is the same in the souce and destinamtion hosts and /home/<user> is mounded on both. Having said that, how do i deal with this public and private key stuff b'coz in both the cases its the same files which are gonna get modified. Existing code attached.
ftp -in <<!
user $userid $passwd