Posted to tcl by funa at Mon Dec 11 08:53:28 GMT 2017view raw

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