Link to home
Start Free TrialLog in
Avatar of bje
bjeFlag for United States of America

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
}
Avatar of DrMadAxe
DrMadAxe
Flag of United States of America image

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?
Avatar of bje

ASKER

upload a file securely
ASKER CERTIFIED SOLUTION
Avatar of eksatx
eksatx
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial