From b04c7a36d71ab8e84e49b4013fd855fb9932d6f5 Mon Sep 17 00:00:00 2001 From: gbaconni Date: Mon, 8 Nov 2021 14:25:55 +0100 Subject: [PATCH] Add ssh expect script --- ssh.exp | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100755 ssh.exp diff --git a/ssh.exp b/ssh.exp new file mode 100755 index 0000000..8abc4b5 --- /dev/null +++ b/ssh.exp @@ -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