fixed add sftp server backup

This commit is contained in:
Dmitry Bannik 2019-07-20 02:36:30 +03:00
commit d74ac9980a
No known key found for this signature in database
GPG key ID: 77EB1F7854C032BB

View file

@ -38,8 +38,7 @@ EOF
sftpc() { sftpc() {
expect -f "-" <<EOF "$@" expect -f "-" <<EOF "$@"
set count 0 set count 0
spawn "/usr/bin/sftp -o StrictHostKeyChecking=no -o \ spawn /usr/bin/sftp -o StrictHostKeyChecking=no -o Port=$port $user@$host
Port=$port '$user@$host'"
expect { expect {
"password:" { "password:" {
send "$password\r" send "$password\r"