Created
June 14, 2017 00:36
-
-
Save LiamKarlMitchell/81e918a9dd7a26b74650adf37dd72544 to your computer and use it in GitHub Desktop.
Automated connect to sftp and download all files.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
USER=$1 | |
PASSWD=$2 | |
HOST=$3 | |
# Connect to FTP and download all files. | |
SSHPASS=$PASSWD sshpass -e sftp -oBatchMode=no -b - $USER@$HOST <<EOF | |
get -r * | |
quit | |
EOF |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Depends on sshpass