Posted to tcl by funa at Mon Dec 11 15:41:56 GMT 2017view raw

  1. #!/usr/bin/expect
  2.  
  3. set timeout -1
  4. spawn ssh -t -o StrictHostKeyChecking=no funabashi@[lindex $argv 0]
  5. expect "password"
  6. send -- "$env(ABC)\r"
  7. send -- "\r"
  8. expect ".*"
  9. send "arp\r"
  10. expect ".*"
  11. send "exit\r"
  12. interact
  13.  
  14.