init III
This commit is contained in:
32
Perl procurve konfigurieren/procurve_config.sh
Normal file
32
Perl procurve konfigurieren/procurve_config.sh
Normal file
@@ -0,0 +1,32 @@
|
||||
#!/usr/bin/expect
|
||||
|
||||
set USER [lindex $argv 0]
|
||||
set PASSWD [lindex $argv 1]
|
||||
set SSHHOST [lindex $argv 2]
|
||||
|
||||
spawn ssh $SSHHOST -l $USER
|
||||
expect "password"
|
||||
send "$PASSWD\r"
|
||||
expect "continue"
|
||||
send "\r"
|
||||
expect "#"
|
||||
send "conf\r"
|
||||
expect "#"
|
||||
send "ip authorized-managers 130.35.0.77 255.255.255.255 access manager\r"
|
||||
expect "#"
|
||||
send "ip authorized-managers 130.35.0.84 255.255.255.255 access manager\r"
|
||||
expect "#"
|
||||
send "ip authorized-managers 130.35.0.92 255.255.255.255 access manager\r"
|
||||
expect "#"
|
||||
send "ip authorized-managers 130.35.0.205 255.255.255.255 access manager\r"
|
||||
expect "#"
|
||||
send "ip authorized-managers 10.10.12.32 255.255.255.240 access manager\r"
|
||||
expect "#"
|
||||
send "wr mem"
|
||||
expect "#"
|
||||
send "logout\r"
|
||||
expect "log out"
|
||||
send "y\r"
|
||||
expect eof
|
||||
exit
|
||||
|
||||
Reference in New Issue
Block a user