#!/usr/bin/bash
python <<-EOF
print "I am Python"
EOF
#!/usr/bin/bash
ssh-keygen -P "" -f ~/.ssh/id_rsa
ping -c1 -W1 192.168.1.10 >& /dev/null
if [[ $? -eq 0 ]];then
/usr/bin/expect <<-EOF
spawn ssh-copy-id 192.168.1.10
expect {
"yes/no" { send "yes\r"; exp_continue }
"password:" { send "123456\r" }
}
expect eof
EOF
fi