Benutzer-Werkzeuge

Webseiten-Werkzeuge


knowledge_base:linux:ssh

Unterschiede

Hier werden die Unterschiede zwischen zwei Versionen der Seite angezeigt.

Link zu der Vergleichsansicht

Nächste Überarbeitung
Vorherige Überarbeitung
knowledge_base:linux:ssh [2020/05/12 17:02] – angelegt julian.lemmerichknowledge_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://raw.githubusercontent.com/JM-Lemmi/JM-Lemmi/main/authorized_keys 
 +</code> 
 + 
 +<file . /etc/ssh/sshd_config> 
 +Port 22 
 +#Port 22222 
 + 
 +PermitRootLogin Prohibit-Password 
 + 
 +PasswordAuthentication no 
 +ChallengeResponseAuthentication no 
 + 
 +#Match Address 10.0.0.0/8,172.16.0.0/12,192.168.0.0/16 
 +#    PasswordAuthentication yes 
 +</file> 
 + 
 +<code bash> 
 +echo "PermitRootLogin Prohibit-Password" >> /etc/ssh/sshd_config 
 +</code> 
 + 
 +=== allow root pw login ===
  
 from [[https://linuxconfig.org/enable-ssh-root-login-on-debian-linux-server|here]]. from [[https://linuxconfig.org/enable-ssh-root-login-on-debian-linux-server|here]].
Zeile 9: Zeile 36:
 </file> </file>
  
-<code bash+=== Pubkeyauth === 
-/etc/init.d/ssh restart+ 
 +from [[https://linuxhandbook.com/add-ssh-public-key-to-server/]] 
 + 
 +add key to ''root/.ssh/authorized_keys'' oder ''/home/user/.ssh/authorized_keys'' 
 + 
 +Settings for only Pubkey auth: 
 + 
 +<file conf /etc/ssh/sshd_config> 
 +PubkeyAuthentication yes 
 +PasswordAuthentication no 
 +</file> 
 + 
 +password has to be explicitely disabled 
 + 
 +=== SSH-Agent === 
 + 
 +To not have to reauth ssh key all the time use ssh-agent: 
 + 
 +<code> 
 +eval `ssh-agent` 
 +ssh-add ~/.ssh/id_ed25519
 </code> </code>
 +
 +===== See also =====
 +
 +  * [[https://iximiuz.com/ssh-tunnels/ssh-tunnels.png|Forwarding Cheat Sheet]]
 +  * [[https://developer.1password.com/docs/ssh/get-started/|1Password SSH-Agent Setup]]
 +  * [[knowledge_base:software_setup:ssh_pubkey|Win10]]
 +  * [[knowledge_base:sonstiges:git_sign_commit|Git Commits Signieren]]
/app/www/public/data/attic/knowledge_base/linux/ssh.1589295756.txt.gz · Zuletzt geändert: 2021/09/24 19:10 (Externe Bearbeitung)