ssh免密码登陆
11.11.11.11为ip
#!/usr/bin/expect
spawn ssh root@11.11.11.11
expect "*assword:*"
send "你的密码\n"
#expect "*#"
interact
ssh免密码上传
cd /myProject/pythonProject/
spawn scp -r ticket_python root@11.11.11.11:/ticket
expect "*assword:*"
send "你的密码\n"
interact