I have been trying to execute a shell script with multiple approach but my script keeps getting stuck at the stage where it prompts to enter a password.
I have also tried to use Expect and Send the password but still not successful.
A very basic shell script I have is below
#!/bin/sh
mv text123.txt to test456.txt
sftp -P 2582 tuser@exemple.com
9874test---> This is the password
cd route
put test456.txt 847c-43b2-8e50-0125n
The put
command pastes the file to an account ID
The code renames the file then enters the connection details but gets stuck when its time to enter password.