Skip to content

Instantly share code, notes, and snippets.

View d4rk8l1tz's full-sized avatar
🎯
Focusing

Kunal Kaul d4rk8l1tz

🎯
Focusing
View GitHub Profile
@d4rk8l1tz
d4rk8l1tz / ssh.expect
Last active August 29, 2015 14:06 — forked from hasanen/ssh.expect
#!/usr/bin/expect -f
set username [lrange $argv 0 0]
set host [lrange $argv 1 1]
set password [lrange $argv 2 2]
set timeout -1
spawn ssh $username@$host
expect "*?assword:*"
send -- "$password\r"
send -- "\r"