Changelog: https://roxy-wi.org/changelog#6_2_0
pull/343/head
Pavel Loginov 2022-09-30 19:00:58 +03:00
parent 1bb5221a07
commit 573aa893e2
5 changed files with 2 additions and 6 deletions

View File

@ -5,7 +5,6 @@ from paramiko import SSHClient
class SshConnection: class SshConnection:
def __init__(self, server_ip, ssh_port, ssh_user_name, ssh_user_password, ssh_enable, ssh_key_name=None): def __init__(self, server_ip, ssh_port, ssh_user_name, ssh_user_password, ssh_enable, ssh_key_name=None):
self.ssh = SSHClient() self.ssh = SSHClient()
self.ssh.load_system_host_keys()
self.ssh.set_missing_host_key_policy(paramiko.AutoAddPolicy()) self.ssh.set_missing_host_key_policy(paramiko.AutoAddPolicy())
self.server_ip = server_ip self.server_ip = server_ip
self.ssh_port = ssh_port self.ssh_port = ssh_port
@ -17,7 +16,7 @@ class SshConnection:
def __enter__(self): def __enter__(self):
try: try:
if self.ssh_enable == 1: 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( self.ssh.connect(
hostname=self.server_ip, hostname=self.server_ip,
port=self.ssh_port, port=self.ssh_port,

View File

@ -3,7 +3,7 @@ enabled = true
filter = roxy-wi filter = roxy-wi
port = http,https port = http,https
action = iptables[name=roxy-wi, port=https, protocol=tcp] 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 findtime = 600
bantime = 600 bantime = 600
maxretry = 2 maxretry = 2

View File

@ -1,5 +1,4 @@
configparser>=3.5.0 configparser>=3.5.0
paramiko-ng>=2.5.0
pytz>=2017.3 pytz>=2017.3
pyTelegramBotAPI>=3.6.3 pyTelegramBotAPI>=3.6.3
slack-sdk>=3.4.0 slack-sdk>=3.4.0

View File

@ -2,7 +2,6 @@ configparser==3.5.0
pyTelegramBotAPI==3.6.3 pyTelegramBotAPI==3.6.3
networkx==2.1 networkx==2.1
matplotlib==2.1.2 matplotlib==2.1.2
paramiko-ng>=2.5.0
slack-sdk>=3.4.0 slack-sdk>=3.4.0
peewee>=3.14.10 peewee>=3.14.10
PyMySQL>=1.0.2 PyMySQL>=1.0.2

View File

@ -2,7 +2,6 @@ configparser>=3.5.0
pyTelegramBotAPI>=3.6.3 pyTelegramBotAPI>=3.6.3
networkx>=2.1 networkx>=2.1
matplotlib>=2.1.2 matplotlib>=2.1.2
paramiko-ng>=2.5.0
slack-sdk>=3.4.0 slack-sdk>=3.4.0
peewee>=3.14.10 peewee>=3.14.10
PyMySQL>=1.0.2 PyMySQL>=1.0.2