Add ssh expect script
This commit is contained in:
9
ssh.exp
Executable file
9
ssh.exp
Executable file
@@ -0,0 +1,9 @@
|
|||||||
|
#!/usr/bin/expect
|
||||||
|
set timeout -1
|
||||||
|
set send_human {.05 0.1 1 .07 1.5}
|
||||||
|
eval spawn ssh -o StrictHostKeyChecking=no -o PreferredAuthentications=password -o PubkeyAuthentication=no $argv
|
||||||
|
match_max 100000
|
||||||
|
expect "*?assword:*"
|
||||||
|
send -- "$env(SSHPASS)\r"
|
||||||
|
send -- "\r"
|
||||||
|
interact
|
||||||
Reference in New Issue
Block a user