bje
asked on
SFTP
Hello,
I would like to know how to pass a password for a sftp routine,
I am sending a file using sftp and need to send the password. The $PASS does not work and I am not sure how this is done. When I run my script, it asks for a password that I need to type for the script to continue. Thanks.
ftp_the_file()
{
sftp -oport=22 $USER@$NODE 2>$ftp_message_file 1>&2 <<EOF
$PASS
cd $DIRECTORY
get $NEW_FILE $NEW_FILE
rm $NEW_FILE
bye
EOF
}
I would like to know how to pass a password for a sftp routine,
I am sending a file using sftp and need to send the password. The $PASS does not work and I am not sure how this is done. When I run my script, it asks for a password that I need to type for the script to continue. Thanks.
ftp_the_file()
{
sftp -oport=22 $USER@$NODE 2>$ftp_message_file 1>&2 <<EOF
$PASS
cd $DIRECTORY
get $NEW_FILE $NEW_FILE
rm $NEW_FILE
bye
EOF
}
maybe another script to post to that form? IDK What are you trying to do ultimately? upload a file securely or send a form securely?
ASKER
upload a file securely
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.