add: omc bin & conf & mib

This commit is contained in:
2024-03-19 14:20:41 +08:00
parent f24411386d
commit 9d4009aaca
115 changed files with 66216 additions and 1 deletions

32
omc/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