SSH-Protokoll: Unterschied zwischen den Versionen

Aus Xinux Wiki
Zur Navigation springen Zur Suche springen
 
(3 dazwischenliegende Versionen desselben Benutzers werden nicht angezeigt)
Zeile 3: Zeile 3:
  
 
= SSH Header =
 
= SSH Header =
{{#drawio:ssh-protokoll-02}}
+
:{| class="wikitable" style="text-align: center"
* 4 Bytes werden für die Paketlänge verwendet
+
|+SSH Header Format
* 1 Byte für die Länge des Paddings
+
|-
* Daten + Padding brauchen des Rest auf
+
! style="border-bottom:none; border-right:none;"| ''Offsets''
 
+
! style="border-left:none;"| Octet
! Field Name            !! Length (bytes) !! Description
+
! colspan="8" | 0
 +
! colspan="8" | 1
 +
! colspan="8" | 2
 +
! colspan="8" | 3
 +
|-
 +
! style="border-top: none" | Octet
 +
! Bit
 +
! style="width:2.6%;"| 0
 +
! style="width:2.6%;"| 1
 +
! style="width:2.6%;"| 2
 +
! style="width:2.6%;"| 3
 +
! style="width:2.6%;"| 4
 +
! style="width:2.6%;"| 5
 +
! style="width:2.6%;"| 6
 +
! style="width:2.6%;"| 7
 +
! style="width:2.6%;"| 8
 +
! style="width:2.6%;"| 9
 +
! style="width:2.6%;"| 10
 +
! style="width:2.6%;"| 11
 +
! style="width:2.6%;"| 12
 +
! style="width:2.6%;"| 13
 +
! style="width:2.6%;"| 14
 +
! style="width:2.6%;"| 15
 +
! style="width:2.6%;"| 16
 +
! style="width:2.6%;"| 17
 +
! style="width:2.6%;"| 18
 +
! style="width:2.6%;"| 19
 +
! style="width:2.6%;"| 20
 +
! style="width:2.6%;"| 21
 +
! style="width:2.6%;"| 22
 +
! style="width:2.6%;"| 23
 +
! style="width:2.6%;"| 24
 +
! style="width:2.6%;"| 25
 +
! style="width:2.6%;"| 26
 +
! style="width:2.6%;"| 27
 +
! style="width:2.6%;"| 28
 +
! style="width:2.6%;"| 29
 +
! style="width:2.6%;"| 30
 +
! style="width:2.6%;"| 31
 +
|-
 +
! 0
 +
! 0
 +
| colspan="32" style="background-color:#86dd74"|''Packet Length''
 
|-
 
|-
| Packet Length         || 4               || Length of the packet (excluding the length of the 'Packet Length' field).
+
! 4
 +
! 32
 +
| colspan="8" style="background-color:#5685a4"|''Padding Length''
 +
| colspan="24" rowspan="4" style="background-color:#79dc74"|''Payload (variabel)''
 
|-
 
|-
| Padding Length        || 1              || Length of the random padding that is added to the packet.
+
! 8
 +
! 64
 
|-
 
|-
| Payload              || Variable        || The actual SSH message that is being transmitted.
+
! 12
 +
! 96
 
|-
 
|-
| Padding              || Variable        || Random data used to ensure the total packet length is a multiple of the block size (typically 8 or 16 bytes).
+
! 16
 +
! 128
 
|-
 
|-
| MAC (Message Authentication Code) || Variable || Message authentication code (if used) to verify the integrity of the packet.
+
! 20
 +
! 160
 +
| colspan="32" style="background-color:#7475dc"|''Padding (variabel)''
 
|-
 
|-
| Compression          || Optional        || Some SSH implementations compress the payload and/or padding for efficiency.
+
! 24
 +
! 192
 +
| colspan="32" style="background-color:#dc7484"|''MAC (optional)''
 +
|}
 +
 
 +
* 4 Bytes werden für die Paketlänge verwendet
 +
* 1 Byte für die Länge des Paddings
 +
* Daten + Padding brauchen des Rest auf
 +
* Folgepakete können auch schon ab der Paketlänge verschlüsselt sein
  
 
= Konfiguration unter Linux =
 
= Konfiguration unter Linux =

Aktuelle Version vom 16. September 2024, 21:36 Uhr

Ablauf des Kommunikationsaufbaus

SSH Header

SSH Header Format
Offsets Octet 0 1 2 3
Octet Bit 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
0 0 Packet Length
4 32 Padding Length Payload (variabel)
8 64
12 96
16 128
20 160 Padding (variabel)
24 192 MAC (optional)
  • 4 Bytes werden für die Paketlänge verwendet
  • 1 Byte für die Länge des Paddings
  • Daten + Padding brauchen des Rest auf
  • Folgepakete können auch schon ab der Paketlänge verschlüsselt sein

Konfiguration unter Linux