Can't get sftp server to accept password from script when entered as part of the "open" command
I'm setting up a script to send files from a Windows 10 computer to a MacOS (Sequoia 15.2) computer and am unable to get the server on the Mac to accept the user password when it is sent as part of the sftp
It works if I leave out the password, here:
The opened terminal window prompts for the username password, like this:
And when the password for username is entered, the script carries on and does its business.
But if I try to automate the process so I don't have to hand-enter the password, like this:
I get this error:
According to the example on https://winscp.net/eng/docs/scripting#example, the password is put after the username, separated by a colon. So I think I am doing this correctly. But it don't work.
How can I automate this with the password inline with the rest of the
Thank you!
open
command.
It works if I leave out the password, here:
open sftp://username@ip-address/ -hostkey="sha - xxx"
Searching for host... Connecting to host... Authenticating... Using username "username". Password:
But if I try to automate the process so I don't have to hand-enter the password, like this:
open sftp://username:password@ip-address -hostkey="sha - xxx"
Searching for host... Connecting to host... Authenticating... Using username "username". Authenticating with pre-entered password. Access denied. Authentication failed. Authentication log (see session log for details): Using username "username". Access denied. Authentication failed.
How can I automate this with the password inline with the rest of the
open
command?
Thank you!