In put password automatically to sftp command

Hi all,

i have to sftp a file to another server

I don't have "expect" or sshpass on my machine its solaris 10, 

i want to pass password in command line or 

after doing this 

sftp user@server how to automatically provide the password as input ( stored in some variable or so)

NOTE: i have authentication key for the server im connecting in my known_hosts but still im unable to establish connect sometimes.

any suggestions regarding

"interactive password authentication" means "password typed by a human being in realtime authentication" and no substitutes for humans are acceptable to the login system.

You'd have to use a third-party brute-forcing utility like expect, and accept the wide-ranging security consequences that come with that.

1 Like