Skip to content

[BUG] - Exception "Incompatible ssh server (no acceptable mac)" with cipher [email protected] when server sends empty list of MAC algos #2491

Open

Description

@cbeytas

Are you using paramiko as a client or server?

Client

What feature(s) aren't working right?

Keys/auth

What version(s) of paramiko are you using?

3.5.0

What version(s) of Python are you using?

3.8.16

What operating system and version are you using?

Windows 10

If you're connecting as a client, which SSH server are you connecting to?

Ubuntu 24.04 with OpenSSH_9.6p1 Ubuntu-3ubuntu13.5, OpenSSL 3.0.13 30 Jan 2024

If you're using paramiko as part of another tool, which tool/version?

No response

Expected/desired behavior

Connection to SSH server fails. Server supplies empty list of MAC algos.
Putty works fine with log:

Initialised AES-128 GCM (AES-NI accelerated) outbound encryption
Initialised AES-GCM (CLMUL accelerated) outbound MAC algorithm (in ETM mode) (required by cipher)
Initialised AES-128 GCM (AES-NI accelerated) inbound encryption
Initialised AES-GCM (CLMUL accelerated) inbound MAC algorithm (in ETM mode) (required by cipher)

According to ibygrave's protocol diff:

AES-GCM is only negotiated as the cipher algorithms "[email protected]" or "[email protected]" and never as an MAC algorithm. Additionally, if AES-GCM is selected as the cipher the exchanged MAC algorithms are ignored and there doesn't have to be a matching MAC.

Actual behavior

Connection throws:
paramiko.ssh_exception.IncompatiblePeer: Incompatible ssh server (no acceptable macs)

How to reproduce

No response

Anything else?

Paramiko Log:

=== Key exchange possibilities ===
kex algos: ecdh-sha2-nistp521, ecdh-sha2-nistp384, ecdh-sha2-nistp256, ext-info-s, [email protected]
server key: rsa-sha2-512, rsa-sha2-256, ecdsa-sha2-nistp256, ssh-ed25519
client encrypt: [email protected], [email protected]
server encrypt: [email protected], [email protected]
client mac: <none>
server mac: <none>
client compress: none, [email protected]
server compress: none, [email protected]
client lang: <none>
server lang: <none>
kex follows: False
=== Key exchange agreements ===
Strict kex mode: True
Kex: ecdh-sha2-nistp256
HostKey: ssh-ed25519
Cipher: [email protected]
Exception (client): Incompatible ssh server (no acceptable macs)

Activity

  1. saiaprameya commented on Nov 25, 2026

    @saiaprameya

    is this fixed? I am facing too
    DEBUG - Remote version/idstring: SSH-2.0-OpenSSH 10.3p1 FIPS PKIX[18.0.2]
    paramiko.transport(1944): INFO Connected (version 2.0, client OpenSSH)
    INFO - Connected (version 2.0, client OpenSSH)
    DEBUG - === Key exchange possibilities ===
    DEBUG - kex algos: ecdh-sha2-nistp384, ecdh-sha2-nistp521, diffie-hellman-group16-sha512, [email protected]
    DEBUG - server key: rsa-sha2-512, rsa-sha2-256, rsa-sha2-512
    DEBUG - client encrypt: [email protected]
    DEBUG - server encrypt: [email protected]
    DEBUG - client mac:
    DEBUG - server mac:
    DEBUG - client compress: none, [email protected]
    DEBUG - server compress: none, [email protected]
    DEBUG - client lang:
    DEBUG - server lang:
    DEBUG - kex follows: False
    DEBUG - === Key exchange agreements ===
    DEBUG - Strict kex mode: True
    DEBUG - Kex: ecdh-sha2-nistp384
    DEBUG - HostKey: rsa-sha2-256
    DEBUG - Cipher: [email protected]
    DEBUG - MAC:
    DEBUG - Compression: none
    DEBUG - === End of kex handshake ===
    DEBUG - EOF in transport thread

    is there a workaround ? This is blocking us

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions