Hier werden die Unterschiede zwischen zwei Versionen gezeigt.
| Beide Seiten, vorherige Überarbeitung Vorherige Überarbeitung Nächste Überarbeitung | Vorherige Überarbeitung | ||
|
admin_grundlagen:ssh [2025/01/31 09:44] natureshadow2 [Serverseitig Passwortauthentifizierung abschalten] |
admin_grundlagen:ssh [2025/08/14 12:24] (aktuell) ingo_wichmann [Syntax prüfen] |
||
|---|---|---|---|
| Zeile 69: | Zeile 69: | ||
| ===== Public-Key auf anderen Rechner übertragen ===== | ===== Public-Key auf anderen Rechner übertragen ===== | ||
| - | ssh-copy-id -i .ssh/id_ed25519.pub nutzer05@notebook06 | + | ssh-copy-id nutzer05@notebook06 |
| oder von Hand: | oder von Hand: | ||
| ssh nutzer05@notebook06 'mkdir -m 700 ~/.ssh' | ssh nutzer05@notebook06 'mkdir -m 700 ~/.ssh' | ||
| Zeile 77: | Zeile 77: | ||
| ===== Serverseitig Passwortauthentifizierung abschalten ===== | ===== Serverseitig Passwortauthentifizierung abschalten ===== | ||
| - | <file txt /etc/ssh/sshd_config.d/local.conf> | + | <file txt /etc/ssh/sshd_config.d/keyonly.conf> |
| - | UsePAM no | + | |
| - | PasswordAuthentication no | + | |
| - | </file> | + | |
| - | + | ||
| - | Alternativ (CentOS 7) | + | |
| - | <file txt /etc/ssh/sshd_config.d/local.conf> | + | |
| UsePAM yes | UsePAM yes | ||
| - | ChallengeResponseAuthentication no | + | KbdInteractiveAuthentication no |
| PasswordAuthentication no | PasswordAuthentication no | ||
| </file> | </file> | ||
| ==== Syntax prüfen ==== | ==== Syntax prüfen ==== | ||
| - | ssh -t | + | sshd -t |
| ==== Dienst neu starten ==== | ==== Dienst neu starten ==== | ||