Benutzer-Werkzeuge

Webseiten-Werkzeuge


it:ssh

SSH - secure Shell

Fingerprints

Hostkeys for OpenSSH

for key in /etc/ssh/ssh_host_*_key.pub; do ssh-keygen -l -f $key ; ssh-keygen -l -E md5 -f $key; done

results in a list of SHA256 and MD5 of all puclic-keys

  1024 SHA256:8hHjqNwC6fjZPocgkqKPtKJywg3VK4qqOWolhTnr3q4 root@h2961986.stratoserver.net (DSA)
  1024 MD5:8e:2c:37:e6:eb:ee:83:ca:19:47:bc:49:c4:52:44:2a root@h2961986.stratoserver.net (DSA)
  256 SHA256:gJAx5qnJALcNtYpS/k13VsGxC/auDwI7G8/8x30c0ok root@h2961986.stratoserver.net (ECDSA)
  256 MD5:23:aa:b6:76:48:fc:23:32:53:7e:71:df:81:71:98:03 root@h2961986.stratoserver.net (ECDSA)
  256 SHA256:/7roBW9SHVT8F404CIIGDPZJgfDdu8DYmRgblHFEpUM root@h2961986.stratoserver.net (ED25519)
  256 MD5:89:46:dc:f0:01:ee:79:db:f3:0d:70:67:28:b3:d5:11 root@h2961986.stratoserver.net (ED25519)
  2048 SHA256:1Jf3EyZ23QY31zRQDXNbIeTzPGHmrVGieqXVHuWMfX8 root@h2961986.stratoserver.net (RSA)
  2048 MD5:9a:70:69:72:1a:96:45:4d:8c:d3:12:4c:dc:57:e6:45 root@h2961986.stratoserver.net (RSA)

Absichern von OpenSSH

* https://www.digitalocean.com/community/tutorials/how-to-harden-openssh-on-ubuntu-18-04-de

unter Debian 11+ kommt einfach folgende Datei nach /etc/ssh/sshd_config.d/

harden-host.conf
PermitRootLogin no
PasswordAuthentication no
PermitEmptyPasswords no
ChallengeResponseAuthentication no
KerberosAuthentication no
GSSAPIAuthentication no
X11Forwarding no
PermitUserEnvironment no
AllowAgentForwarding no
AllowTcpForwarding no
PermitTunnel no

Um einfachen Portscans zu entgehen kann man auch noch die Portnummer ändern. Das reduziert das Grundrauschen etwas, aber die regulär laufenden „deep scans“ finden das natürlich auch schnell raus.

alternative-port.conf
Port 22000
it/ssh.txt · Zuletzt geändert: 2022/02/23 22:59 von sven