Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Expect script for sending passwords when upgrading puppet agent
set timeout 60
spawn ./ <fqdn> <fqdn> <fqdn>
while {1} {
expect {
eof {break}
"The authenticity of host" {send "yes\r"}
"password for YOURUSER:" {send "PASSWORD\r"}
#"*\]" {send "exit\r"}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment