mirror of https://github.com/Aidaho12/haproxy-wi
parent
1bb5221a07
commit
573aa893e2
|
@ -5,7 +5,6 @@ from paramiko import SSHClient
|
|||
class SshConnection:
|
||||
def __init__(self, server_ip, ssh_port, ssh_user_name, ssh_user_password, ssh_enable, ssh_key_name=None):
|
||||
self.ssh = SSHClient()
|
||||
self.ssh.load_system_host_keys()
|
||||
self.ssh.set_missing_host_key_policy(paramiko.AutoAddPolicy())
|
||||
self.server_ip = server_ip
|
||||
self.ssh_port = ssh_port
|
||||
|
@ -17,7 +16,7 @@ class SshConnection:
|
|||
def __enter__(self):
|
||||
try:
|
||||
if self.ssh_enable == 1:
|
||||
k = paramiko.pkey.load_private_key_file(self.ssh_key_name)
|
||||
k = paramiko.RSAKey.from_private_key_file(self.ssh_key_name)
|
||||
self.ssh.connect(
|
||||
hostname=self.server_ip,
|
||||
port=self.ssh_port,
|
||||
|
|
|
@ -3,7 +3,7 @@ enabled = true
|
|||
filter = roxy-wi
|
||||
port = http,https
|
||||
action = iptables[name=roxy-wi, port=https, protocol=tcp]
|
||||
logpath = /var/www/haproxy-wi/log/roxy-wi-*.log
|
||||
logpath = /var/log/roxy-wi/roxy-wi-*.log
|
||||
findtime = 600
|
||||
bantime = 600
|
||||
maxretry = 2
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
configparser>=3.5.0
|
||||
paramiko-ng>=2.5.0
|
||||
pytz>=2017.3
|
||||
pyTelegramBotAPI>=3.6.3
|
||||
slack-sdk>=3.4.0
|
||||
|
|
|
@ -2,7 +2,6 @@ configparser==3.5.0
|
|||
pyTelegramBotAPI==3.6.3
|
||||
networkx==2.1
|
||||
matplotlib==2.1.2
|
||||
paramiko-ng>=2.5.0
|
||||
slack-sdk>=3.4.0
|
||||
peewee>=3.14.10
|
||||
PyMySQL>=1.0.2
|
||||
|
|
|
@ -2,7 +2,6 @@ configparser>=3.5.0
|
|||
pyTelegramBotAPI>=3.6.3
|
||||
networkx>=2.1
|
||||
matplotlib>=2.1.2
|
||||
paramiko-ng>=2.5.0
|
||||
slack-sdk>=3.4.0
|
||||
peewee>=3.14.10
|
||||
PyMySQL>=1.0.2
|
||||
|
|
Loading…
Reference in New Issue