ssh

Unterschiede

Hier werden die Unterschiede zwischen zwei Versionen angezeigt.

Link zu dieser Vergleichsansicht

Nächste Überarbeitung
Vorhergehende Überarbeitung
ssh [2021/04/01 18:31] – angelegt Fabian Horstssh [2023/01/20 14:32] (aktuell) Fabian Horst
Zeile 1: Zeile 1:
 +====== Login ohne Key Checking ======
 +Macht ssh-rsa wieder funktionsfähig (Ubuntu 22.04...), checkt keine Keys und sucht vorhanden im Schwarzen Loch ;-)
 +
 +<code>ssh -o HostKeyAlgorithms=+ssh-rsa -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null ubnt@192.168.1.20</code>
 +
 +===== SSH =====
 +
 +Based on: https://community.hetzner.com/tutorials/securing-ssh
 +
 StrictHostKeyChecking no kein Key Checking in config StrictHostKeyChecking no kein Key Checking in config
 +
 +<code>
 +Include /etc/ssh/sshd_config.d/*.conf
 +
 +Port 22
 +MaxAuthTries 2
 +AllowTcpForwarding no
 +X11Forwarding no
 +AllowAgentForwarding no
 +
 +# root login verbieten= no 
 +PermitRootLogin yes
 +
 +ClientAliveInterval 300
 +ClientAliveCountMax 1
 +
 +PubkeyAuthentication yes
 +PasswordAuthentication no
 +ChallengeResponseAuthentication no
 +UsePAM no
 +
 +PrintMotd no
 +
 +AcceptEnv LANG LC_*
 +# override default of no subsystems
 +Subsystem sftp  /usr/lib/openssh/sftp-server
 +</code>
 +
 +Einstellungen testen:
 +<code>sshd -t</code>
 +<code>systemctl restart sshd</code>
 +
 +Fail2Ban:
 +<code>apt install fail2ban</code>
 +<code>systemctl enable fail2ban</code>
 +<code>cp /etc/fail2ban/jail.conf /etc/fail2ban/jail.local</code>
 +
 +Aktuelle "Zellenbelegung" anzeigen:
 +<code>fail2ban-client status sshd</code>
 +
 +Neue Einstellungen laden:
 +<code>systemctl restart fail2ban</code>
 +
 +
 +Schickes Dateien kopieren mit:
 +
 +https://www.digitalocean.com/community/tutorials/how-to-use-sshfs-to-mount-remote-file-systems-over-ssh
 +
  • ssh.1617294667.txt.gz
  • Zuletzt geändert: 2021/04/01 18:31
  • von Fabian Horst