Benutzer-Werkzeuge

Webseiten-Werkzeuge


knowledge_base:linux:ssh

Unterschiede

Hier werden die Unterschiede zwischen zwei Versionen der Seite angezeigt.

Link zu der Vergleichsansicht

Beide Seiten, vorherige ÜberarbeitungVorherige Überarbeitung
Nächste Überarbeitung
Vorherige Überarbeitung
knowledge_base:linux:ssh [2023/01/29 18:20] – ↷ Links angepasst weil Seiten im Wiki verschoben wurden 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 =====
  
-from [[https://linuxconfig.org/enable-ssh-root-login-on-debian-linux-server|here]].+=== Recommended config ===
  
-<file bash /etc/ssh/sshd_config> +<code bash
-PermitRootLogin yes+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> </file>
  
 <code bash> <code bash>
-/etc/init.d/ssh restart+echo "PermitRootLogin Prohibit-Password" >> /etc/ssh/sshd_config
 </code> </code>
  
-===== add Pubkey to server =====+=== allow root pw login ==
 + 
 +from [[https://linuxconfig.org/enable-ssh-root-login-on-debian-linux-server|here]]. 
 + 
 +<file bash /etc/ssh/sshd_config> 
 +PermitRootLogin yes 
 +</file> 
 + 
 +=== Pubkeyauth ===
  
 from [[https://linuxhandbook.com/add-ssh-public-key-to-server/]] from [[https://linuxhandbook.com/add-ssh-public-key-to-server/]]
Zeile 27: Zeile 50:
  
 password has to be explicitely disabled 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>
  
 ===== See also ===== ===== See also =====
  
-[[knowledge_base:software_setup:ssh_pubkey|Win10]]+  * [[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.1675012849.txt.gz · Zuletzt geändert: 2023/01/29 18:20 von julian.lemmerich