init III
This commit is contained in:
16
Perl Ubiquiti mpower steuerung/device control/port.exp
Normal file
16
Perl Ubiquiti mpower steuerung/device control/port.exp
Normal file
@@ -0,0 +1,16 @@
|
||||
#!/usr/bin/expect -f
|
||||
set timeout 10
|
||||
|
||||
set user [lindex $argv 0]
|
||||
set host [lindex $argv 1]
|
||||
set pass [lindex $argv 2]
|
||||
set cmd [lindex $argv 3]
|
||||
|
||||
spawn ssh $user@$host -oKexAlgorithms=+diffie-hellman-group1-sha1 -caes256-cbc
|
||||
expect "*?assword:*"
|
||||
send -- "$pass\r"
|
||||
sleep 5
|
||||
send -- "$cmd\r"
|
||||
sleep 2
|
||||
send -- "exit\r"
|
||||
expect eof
|
||||
Reference in New Issue
Block a user