expect

expect

Creator
Creator
Seonglae ChoSeonglae Cho
Created
Created
2020 Jan 10 13:28
Editor
Edited
Edited
2022 Nov 30 18:44
Refs
Refs
  • have to change file mod
chmod 755 exp-file
 
 
  • simple example
#!/usr/bin/expect set timeout -1 set target_host [lindex $argv 0] set password [lindex $argv 1] spawn bash -c "ssh $target_host" expect { "password: " { send "$password\r" } } interact
 
 

Recommendations