I am struggling to make a sftp connection.We need to make a sftp connection to download files.
My requirement is that we are moving from ftp gateway to axway and We were using ftp before to download a list of files from a thridparty. This ftp connection and pwd authentication was written in perl and we wanted to move everything to shell/bash script.
Though I am able to connect manually using
sftp -o ProxyCommand='nc -v -xproxysocks.fmr.com:1080 %h %p' email@example.com and then password. But when I try to sftp expect or use same command in bash it says The authenticity of host 'proxyxxx.fmr.com' can't be established is seen or it waits for a while and terminates.
Can some one please let me know how to achieve this automated process because this is invokee by cronjob every other day.
We can't take the ssh key approach as it is a third party server.