SSH Verbindung scheitert (hardened SSH auf RHEL8)

Moderator: pandel

Antworten
plnb
Beiträge: 9
Registriert: 27 Okt 2020, 17:10

SSH Verbindung scheitert (hardened SSH auf RHEL8)

Beitrag von plnb »

Hallo zusammen,

wir haben einen opsi-Server auf RHEL8-Basis aufgesetzt; soweit funktioniert alles.
Einzig mit dem opsi-package-builder gibt es ein Problem.

Wenn ich ein Paket packen möchte, wird ja via SSH versucht, "opsi-makepackage" auszuführen;
die SSH Verbindung scheitert leider, auf Grund der SSH-Config auf Serverseite.
Diese ist aus Security-Gründen (von u.A. RedHat selbst) für RHEL8 empfohlen; wir möchten das unter keinen Umständen aufweichen!

Code: Alles auswählen

Environment=OPTIONS="-oMACs=hmac-sha2-512-etm@openssh.com,hmac-sha2-256-etm@openssh.com,umac-128-etm@openssh.com -oCiphers=chacha20-poly1305@openssh.com,aes256-gcm@openssh.com,aes128-gcm@openssh.com,aes256-ctr,aes192-ctr,aes128-ctr -oKexAlgorithms=curve25519-sha256,curve25519-sha256@libssh.org,diffie-hellman-group18-sha512,diffie-hellman-group16-sha512 -oHostKeyAlgorithms=ssh-ed25519,ssh-ed25519-cert-v01@openssh.com,rsa-sha2-512,rsa-sha2-256 -oPubkeyAcceptedKeyTypes=ssh-ed25519,ssh-ed25519-cert-v01@openssh.com,rsa-sha2-512,rsa-sha2-256,ssh-rsa -oGSSAPIKeyExchange=no"
Meldung im opsi-package-builder:

Code: Alles auswählen

[2021-12-16 10:09:25 AM] - oPB.core.processing.OpsiProcessing            -  SSHINFO - Trying to execute command: sh -c opsi-makepackage -v --no-md5 --no-zsync (processing: _processAction - line 910, process 8448)
[2021-12-16 10:09:25 AM] - oPB.core.processing.OpsiProcessing            -  SSHINFO - Start SSH shell with full environment update / no pseudo TTY (processing: _processAction - line 950, process 8448)
[2021-12-16 10:09:25 AM] - oPB.core.processing.OpsiProcessing            -    ERROR - ConnectionError('Error creating SSH connection --> Original error: Incompatible ssh peer (no acceptable kex algorithm)') (processing: _processAction - line 1027, process 8448)
[2021-12-16 10:09:25 AM] - oPB.core.processing.OpsiProcessing            -    ERROR - Set return code to RET_SSHCONNERR (processing: _processAction - line 1028, process 8448)
Meldung auf dem Server:

Code: Alles auswählen

Dec 16 10:16:05 opsi sshd[674214]: Unable to negotiate with x.x.x.x port 55502: no matching key exchange method found. Their offer: ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group-exchange-sha256,diffie-hellman-group-exchange-sha1,diffie-hellman-group14-sha1,diffie-hellman-group1-sha1 [preauth]
Wir würden uns wünschen, dass der opsi-package-builder entsprechende Verfahren unterstützt, damit die SSH-Verbindung darüber klappt.
Wäre es möglich, das bei einem zukünftigen Update mit aufzunehmen? / Ist ein github issue o.Ä. der bessere Ort für diesen Feature-Request?
Der Workaround "händisch" auf dem Server die Pakete zu bauen, klappt zwar für den Moment, ist aber nicht sonderlich komfortabel.

Vielen Dank schonmal :)
Antworten