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/29 11:05] – added [add Pubkey to Server] 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 |
- | from [[https:// | + | === Recommended config === |
- | <file bash / | + | <code bash> |
- | PermitRootLogin yes | + | mkdir ~/.ssh |
+ | cd ~/.ssh | ||
+ | wget https:// | ||
+ | </ | ||
+ | |||
+ | <file . / | ||
+ | Port 22 | ||
+ | #Port 22222 | ||
+ | |||
+ | PermitRootLogin | ||
+ | |||
+ | PasswordAuthentication no | ||
+ | ChallengeResponseAuthentication no | ||
+ | |||
+ | #Match Address 10.0.0.0/ | ||
+ | # PasswordAuthentication | ||
</ | </ | ||
<code bash> | <code bash> | ||
- | /etc/init.d/ssh restart | + | echo " |
</ | </ | ||
- | ===== add Pubkey to server ===== | + | === allow root pw login === |
- | from FIXME | + | from [[https:// |
+ | |||
+ | <file bash / | ||
+ | PermitRootLogin yes | ||
+ | </ | ||
+ | |||
+ | === Pubkeyauth === | ||
+ | |||
+ | from [[https:// | ||
add key to '' | 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 ~/ | ||
+ | </ | ||
===== See also ===== | ===== See also ===== | ||
- | [[knowledge_base: | + | * [[https:// |
+ | * [[https:// | ||
+ | * [[knowledge_base: | ||
+ | * [[knowledge_base: |