add bin/mib conf dual file

This commit is contained in:
2024-10-19 15:36:39 +08:00
parent 8feba9929d
commit 6156304aed
99 changed files with 66362 additions and 1 deletions

32
bin/initKeys Normal file
View File

@@ -0,0 +1,32 @@
#!/usr/bin/expect
#This script use to init the server keys, it rewrite the known_hosts config file
#This script have 3 parameters
#remoteip: the ip of the remote server
#username: the name for logging in
#userpass: the password for logging in
set remoteip [lindex $argv 0]
set username [lindex $argv 1]
set userpass [lindex $argv 2]
set timeout 5
spawn sftp $username@$remoteip
expect "*(yes/no)?*"
send "yes\n"
expect "*password*"
send "$userpass\n"
expect "*sftp>*"
send "quit\n"
expect eof
exit