Skip to content

Instantly share code, notes, and snippets.

@paresharma
Last active February 11, 2017 13:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save paresharma/79a1dd99bf5589570004ea951863d20d to your computer and use it in GitHub Desktop.
Save paresharma/79a1dd99bf5589570004ea951863d20d to your computer and use it in GitHub Desktop.
#!/usr/bin/expect -f
set SERVER [lindex $argv 0];
set PASSWORD [lindex $argv 1];
spawn ssh $SERVER
expect "assword:"
send "$PASSWORD\r"
interact
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment