Pgadmin4: Error module 'paramiko' has no attribute 'Ed25519Key'

Viewed 4913

This only happens when you attempt to connect to a database with pgadmin using ssh tunneling. The most up-to-date version of paramiko and pgadmin4 in the ubuntu 18.04 repositories will not fix the issue.

2 Answers

This issue is caused because the sshtunnel python3 library attempts to load paramiko.Ed25519Key regardless of whether the version of paramiko installed supports this keytype or not. The easiest workaround I found was to install a newer version of python3-paramiko using the latest proposed deb from launchpad:

sudo apt install python3-bcrypt
wget https://launchpad.net/ubuntu/+archive/primary/+files/python3-paramiko_2.4.1-0ubuntu2_all.deb
sudo dpkg -i python3-paramiko_2.4.1-0ubuntu2_all.deb

Then restart pgadmin, and connecting to a database via an ssh tunnel should work again.

This is a rather janky solution, but removing the Ed25519Key referencing options and code in /usr/lib/python3/dist-packages/sshtunnel.py will also work (so long as you don't need that option at least).

Related