Posted to tcl by funa at Mon Dec 11 08:47:26 GMT 2017view raw

  1. #!/bin/bash
  2.  
  3. PWD="$PASS"
  4.  
  5. /usr/bin/expect - <<EOF
  6. set timeout -1
  7. spawn ssh -o StrictHostKeyChecking=no funabashi@$1
  8. expect "password"
  9. send -- "$PWD\r"
  10. send -- "\r"
  11. expect "$ "
  12. send "arp -ne\r"
  13. expect "$ "
  14. interact
  15. EOF
  16.