Answer the question
In order to leave comments, you need to log in
How to add password input to shell script?
Hello.
I used a similar code to download archives from the server
#!/bin/sh
HOST="host"
PORT="21"
USER="user"
PASSWD="pass"
FILE="dir"
UFILE="dir"
ftp -n $HOST $PORT <<EOF
quote USER $USER
quote PASS $PASSWD
bin
get $FILE $UFILE
quit
EOF
exit 0
scp [email protected]:/dir /dir
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question