Changeset 4823
- Timestamp:
- 11/25/08 09:22:32 (4 years ago)
- File:
-
- 1 edited
-
developers/tick/scripts/sshn (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
developers/tick/scripts/sshn
r4712 r4823 7 7 } 8 8 9 spawn ssh -o stricthostkeychecking=no root@192.168.0.202 10 expect { 11 "Are you sure you want to continue connecting*" 12 {send "yes\r";exp_continue} 13 "root@*'s password:*" {send "\r\n";interact} 9 10 while 1 { 11 spawn ssh -o stricthostkeychecking=no root@192.168.0.202 12 expect { 13 "Are you sure you want to continue connecting*" 14 {send "yes\r";exp_continue} 15 "root@*'s password:*" {send "\r\n";interact; exit} 16 -regexp {Offending[[:space:]]+key[[:space:]]+in[[:space:]]+/home/([[:alpha:]]+)/\.ssh/known_hosts:([[:digit:]]+)} { 17 set whoami "$expect_out(1,string)" 18 set delline "$expect_out(2,string)" 19 exec sed -i ${delline}d /home/${whoami}/.ssh/known_hosts 20 } 21 } 14 22 }
Note: See TracChangeset
for help on using the changeset viewer.
