Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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.

like image 750
klfwip Avatar asked Aug 24 '18 23:08

klfwip


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.

like image 181
klfwip Avatar answered Nov 13 '22 10:11

klfwip


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).

like image 1
dgsan Avatar answered Nov 13 '22 10:11

dgsan