#!/usr/bin/expect
set password "L2%zOoEb"
#set password conbiz0525
#download
spawn scp -P8022 convstcn@103.234.120.108:/opt/storage-swiftlive/business/* /opt/storage/log/2blive/ready/business_log/
#spawn scp conversant@192.168.5.2:/opt/app/keepalived/install-sh /opt/app
set timeout 300
#expect "Are you sure you want to continue connecting (yes/no)?"
#send "yes\r"
expect "convstcn@103.234.120.108's password:"
#expect "conversant@192.168.5.2's password:"
set timeout 300
send "$password\r"
set timeout 300
send "exit\r"
expect eof
set password "L2%zOoEb"
#set password conbiz0525
#download
spawn scp -P8022 convstcn@103.234.120.108:/opt/storage-swiftlive/business/* /opt/storage/log/2blive/ready/business_log/
#spawn scp conversant@192.168.5.2:/opt/app/keepalived/install-sh /opt/app
set timeout 300
#expect "Are you sure you want to continue connecting (yes/no)?"
#send "yes\r"
expect "convstcn@103.234.120.108's password:"
#expect "conversant@192.168.5.2's password:"
set timeout 300
send "$password\r"
set timeout 300
send "exit\r"
expect eof