automatic SFTP without doing passwordless key with ssh-keygen

I need to automate a file transfer thru SFTP. But I cannot do a passwordless key with ssh-keygen between the servers. Is there any other way like we do something like below in FTP???

ftp -n hostIP << EOF
user userid password
get filename
EOF

This has been answered very often in this forum. Try using the search function of the forum first, thanks.

If you have the expect tool you can use that to create an automatic SFTP login/send script, for example.

What OS do you have?

Solaris

This has been answered very often in this forum. Try using the search function of the forum first,
Have patience and search in the forum first.

"interactive password authentication" means "password typed by a human being in realtime authentication". That's the only way it's supposed to take a password, and they did everything they feasibly could to prevent you from brute-forcing it any other way.

There's a reason you have to install third-party hacking utilities to even try -- it's a bad idea to keep recoverably stored passwords around, and completely avoidable.