Hier werden die Unterschiede zwischen zwei Versionen der Seite angezeigt.
Beide Seiten, vorherige ÜberarbeitungVorherige ÜberarbeitungNächste Überarbeitung | Vorherige Überarbeitung | ||
knowledge_base:linux:ssh [2021/09/27 16:14] – moved [win10] to Windows and added See also julian.lemmerich | knowledge_base:linux:ssh [2024/11/04 22:49] (aktuell) – add 1Password Agent link julian.lemmerich | ||
---|---|---|---|
Zeile 1: | Zeile 1: | ||
====== SSH ====== | ====== SSH ====== | ||
- | ===== debian | + | ===== Debian |
+ | |||
+ | === Recommended config === | ||
+ | |||
+ | <code bash> | ||
+ | mkdir ~/.ssh | ||
+ | cd ~/.ssh | ||
+ | wget https:// | ||
+ | </ | ||
+ | |||
+ | <file . / | ||
+ | Port 22 | ||
+ | #Port 22222 | ||
+ | |||
+ | PermitRootLogin Prohibit-Password | ||
+ | |||
+ | PasswordAuthentication no | ||
+ | ChallengeResponseAuthentication no | ||
+ | |||
+ | #Match Address 10.0.0.0/ | ||
+ | # PasswordAuthentication yes | ||
+ | </ | ||
+ | |||
+ | <code bash> | ||
+ | echo " | ||
+ | </ | ||
+ | |||
+ | === allow root pw login === | ||
from [[https:// | from [[https:// | ||
Zeile 9: | Zeile 36: | ||
</ | </ | ||
- | < | + | === Pubkeyauth === |
- | /etc/init.d/ssh restart | + | |
+ | from [[https:// | ||
+ | |||
+ | add key to '' | ||
+ | |||
+ | Settings for only Pubkey auth: | ||
+ | |||
+ | <file conf / | ||
+ | PubkeyAuthentication yes | ||
+ | PasswordAuthentication no | ||
+ | </ | ||
+ | |||
+ | password has to be explicitely disabled | ||
+ | |||
+ | === SSH-Agent === | ||
+ | |||
+ | To not have to reauth ssh key all the time use ssh-agent: | ||
+ | |||
+ | < | ||
+ | eval `ssh-agent` | ||
+ | ssh-add ~/.ssh/id_ed25519 | ||
</ | </ | ||
===== See also ===== | ===== See also ===== | ||
- | [[knowledge_base: | + | * [[https:// |
+ | * [[https:// | ||
+ | * [[knowledge_base: | ||
+ | * [[knowledge_base: |