> ssh-keygen-t ed25519 Generating public/private ed25519 key pair. # 指定密钥生成位置 Enter file in which to save the key (C:\Users\<user>/.ssh/id_ed25519): # 输入密钥密码 Enter passphrase (empty for no passphrase): # 再输一遍 Enter same passphrase again:
× fail2ban.service - Fail2Ban Service Loaded: loaded (/lib/systemd/system/fail2ban.service; enabled; preset: enabled) Active: failed (Result: exit-code) since Thu 2024-06-27 04:11:07 PDT; 2s ago Duration: 261ms Docs: man:fail2ban(1) Process: 41856 ExecStart=/usr/bin/fail2ban-server -xf start (code=exited, status=255/EXCEPTION) Main PID: 41856 (code=exited, status=255/EXCEPTION) CPU: 247ms
systemd[1]: Started fail2ban.service - Fail2Ban Service. fail2ban-server[41856]: 2024-06-27 04:11:07,381 fail2ban.configreader [41856]: WARNING 'allowipv6' not defined in 'Definition'. Using default one: 'auto' fail2ban-server[41856]: 2024-06-27 04:11:07,406 fail2ban [41856]: ERROR Failed during configuration: Have not found any log file for sshd jail fail2ban-server[41856]: 2024-06-27 04:11:07,410 fail2ban [41856]: ERROR Async configuration of server failed systemd[1]: fail2ban.service: Main process exited, code=exited, status=255/EXCEPTION systemd[1]: fail2ban.service: Failed with result 'exit-code'.
到 /etc/fail2ban 下创建文件 jail.local
1 2 3 4 5 6 7 8 9 10 11 12 13
[DEFAULT] # Debian 12 has no log files, just journalctl backend = systemd
2023-08-15 13:07:06,212 fail2ban.server [32501]: INFO Starting Fail2ban v1.0.2 2023-08-15 13:07:06,213 fail2ban.observer [32501]: INFO Observer start... 2023-08-15 13:07:06,219 fail2ban.database [32501]: INFO Connected to fail2ban persistent database '/var/lib/fail2ban/fail2ban.sqlite3' 2023-08-15 13:07:06,219 fail2ban.jail [32501]: INFO Creating new jail 'sshd' 2023-08-15 13:07:06,424 fail2ban.jail [32501]: ERROR Backend 'systemd' failed to initialize due to No module named 'systemd' ... absolutely HUGE stack trace here ... 2023-08-15 13:07:06,428 fail2ban [32501]: ERROR NOK: ("Failed to initialize any backend for Jail 'sshd'",) 2023-08-15 13:07:06,429 fail2ban.server [32501]: INFO Shutdown in progress... 2023-08-15 13:07:06,429 fail2ban.observer [32501]: INFO Observer stop ... try to end queue 5 seconds 2023-08-15 13:07:06,450 fail2ban.observer [32501]: INFO Observer stopped, 0 events remaining. 2023-08-15 13:07:06,490 fail2ban.server [32501]: INFO Stopping all jails 2023-08-15 13:07:06,490 fail2ban.database [32501]: INFO Connection to database closed. 2023-08-15 13:07:06,691 fail2ban.server [32501]: INFO Exiting Fail2ban