Ssh jump-host: Unterschied zwischen den Versionen

Aus Xinux Wiki
Zur Navigation springen Zur Suche springen
 
Zeile 13: Zeile 13:
 
    
 
    
 
  Host ns
 
  Host ns
     Hostname 10.81.2XX.21
+
     Hostname 10.88.2XX.21
 
     User kit
 
     User kit
 
     ProxyJump fw
 
     ProxyJump fw
Zeile 21: Zeile 21:
 
     User kit
 
     User kit
 
     ProxyJump fw
 
     ProxyJump fw
 +
 
=SSH key generieren=
 
=SSH key generieren=
 
;Auf dem '''host'''
 
;Auf dem '''host'''

Aktuelle Version vom 7. Juli 2026, 09:23 Uhr

Prinzip

  • host sieht ns nicht
  • host sieht fw
  • fw sieht ns
  • host springt über fw zu ns

Auf dem Host eintragen

  • cat ~/.ssh/config
Host fw
 Hostname 192.168.HS.2XX
 User kit   
 
Host ns
    Hostname 10.88.2XX.21
    User kit
    ProxyJump fw

Host www
    Hostname 10.88.2XX.11
    User kit
    ProxyJump fw

SSH key generieren

Auf dem host
  • ssh-keygen
  • ssh-copy-id fw
danach
  • ssh-copy-id ns

Einlogen vom Host

  • ssh ns

Voraussetzung

Auf dem Jump Host muss folgendes in der /etc/ssh/sshd_config aktiv sein.

AllowTcpForwarding yes

Manuell ohne Konfigurationsdatei

  • ssh -J kit@192.168.10.213:6666 kit@10.88.213.21