Skip to content

Fixes for Debian bookworm#58

Open
sebastic wants to merge 4 commits intoNextpertise:masterfrom
sebastic:bookworm
Open

Fixes for Debian bookworm#58
sebastic wants to merge 4 commits intoNextpertise:masterfrom
sebastic:bookworm

Conversation

@sebastic
Copy link
Contributor

@sebastic sebastic commented Feb 27, 2024

Running the tests in a Debian bookworm environment revealed some issues.

  • flake8: E275 missing whitespace after keyword.
    Fixed by putting a space between if and (.
  • flake8: flake8: E501 line too long
    Fixed by using multiple lines for the comment.
  • Test coverage was missing since 005f75a.
    Fixed by restoring the pytest-cov options in setup.cfg.
  • Remote hooks fails on Debian squeeze hosts.
    Fixed by adding sshdisabledalgs option to jobs which is passed to paramiko.SSHClient.connect() as the its disabled_algorithms argument.
    See also: https://www.paramiko.org/changelog.html#2.9.0

Bas Couwenberg added 4 commits February 27, 2024 08:37
Paramiko 2.9.0 added support for SHA-2 variants of RSA key verification
algorithms. See: https://www.paramiko.org/changelog.html#2.9.0

This breaks connections to Debian squeeze hosts which don't support these
nor server-sig-algs to help Paramilo make the right choice.

Example of a failed connection:
```
DEBUG:paramiko.transport:Finalizing pubkey algorithm for key of type 'ssh-rsa'
DEBUG:paramiko.transport:Our pubkey algorithm list: ['rsa-sha2-512', 'rsa-sha2-256', 'ssh-rsa']
DEBUG:paramiko.transport:Server did not send a server-sig-algs list; defaulting to our first preferred algo ('rsa-sha2-512')
DEBUG:paramiko.transport:NOTE: you may use the 'disabled_algorithms' SSHClient/Transport init kwarg to disable that or other algorithms if your server does not support them!
INFO:paramiko.transport:Authentication (publickey) failed.
```

This can be fixed by setting the following in the job configuration:
```
ssh_disabledalgs:
  pubkeys:
    - rsa-sha2-512
    - rsa-sha2-256
```

The connection then succeeds:
```
DEBUG:paramiko.transport:Finalizing pubkey algorithm for key of type 'ssh-rsa'
DEBUG:paramiko.transport:Our pubkey algorithm list: ['ssh-rsa']
DEBUG:paramiko.transport:Server did not send a server-sig-algs list; defaulting to our first preferred algo ('ssh-rsa')
DEBUG:paramiko.transport:NOTE: you may use the 'disabled_algorithms' SSHClient/Transport init kwarg to disable that or other algorithms if your server does not support them!
INFO:paramiko.transport:Authentication (publickey) successful!
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant