Error while connection via ssh tunnel and ssh key authentication
While connection to a server using ssh tunnel and key authentication for the tunnel, the error "module 'paramiko' has no attribute 'DSSKey'" occurs.
To Reproduce
Steps to reproduce the behavior:
- Connect to a server via ssh and use an key agent
- See the error
Expected behavior
The error should not occur.
Error message
module 'paramiko' has no attribute 'DSSKey'
Screenshots
Desktop (please complete the following information):
- Version: 9.7
- Application Mode: Desktop
- Commit: cad6025ce9900dbe29c36e62d7bfb721a9820955 2025-08-20
- Python Version: 3.13.7
- Current User: [email protected]
- Electron Version: 35.4.0
- Browser: Chrome 134.0.6998.205
- Operating System: Windows-11-10.0.26100-SP0
Same here on Mac OS 15.6 Desktop app. PgAdmin version 9.7
Hi All,
Sure, we will verify it. Just for your information, we haven’t made any changes to the SSHTunnel logic. It looks like the Paramiko package released a new version (4.0.0) on August 4, 2025.
Same here. Can we downgrade pgAdmin as a temp fix?
I have the same issue, similar setup. Was fixed by downgrading back to 9.6
@Orrison I am having the issue in version 9.6. Hmmm, can I even downgrade pgAdmin since I installed it with PG 17.6? For now I have been just doing ssh port forwarding in Powershell.
Oh sorry, I mis-read this all. I am on Mac OS. Not sure if that makes a difference
Same here. Version 9.7
This is an issue with sshtunnel as its dependency paramiko==4.0.0 has dropped DSSKey (DSAKey) support.
See: https://github.com/pahaz/sshtunnel/pull/301
To fix this, you can manually install paramiko==3.5.1 in your pgAdmin 4's Python environment.
python3 -m pip install paramiko==3.5.1
Then relaunch pgAdmin4 to take effect.
You may need to replace python3 depending on your installation. With a package installation on Windows 11, it's on 'C:\Users\%USERNAME%\AppData\Local\Programs\pgAdmin 4\python\python.exe'.
on apple silicon with pgadmin4 installed via brew the command is
/Applications/pgAdmin\ 4.app/Contents/Frameworks/Python.framework/Versions/3.13/bin/pip3 install paramiko==3.5.1
For anyone experiencing this in Ubuntu 24.04
Close pgadmin, then remove paramiko and install 3.5.1 as prompt by @naoki-h-dtsi
source /usr/pgadmin4/venv/bin/activate
sudo /usr/pgadmin4/venv/bin/pip uninstall paramiko
sudo /usr/pgadmin4/venv/bin/pip install paramiko==3.5.1
Relaunch pgadmin, should work
All,
I have pinned the Paramiko version to 3.5.1. Please test the fix on tomorrow's snapshot build 26-08.
Ensure the folder is dated 26th Aug or later.
For anyone who have pgAdmin4 installed via Flatpak, here's how I temporarily fixed it:
- Close pgAdmin4 if it's currently running
- Create a virtual environment with the correct paramiko version:
mkdir -p ~/.local/share/pgadmin-fix
cd ~/.local/share/pgadmin-fix
python3 -m venv venv
source venv/bin/activate
pip install paramiko==3.5.1
- Configure the Flatpak to use the fixed paramiko version:
flatpak override --user --env=PYTHONPATH="/home/$USER/.local/share/pgadmin-fix/venv/lib/python3.12/site-packages" org.pgadmin.pgadmin4
- Verify the fix:
flatpak run --command=python3 org.pgadmin.pgadmin4 -c "import paramiko; print('Paramiko version:', paramiko.__version__)"
Should output: Paramiko version: 3.5.1
To undo the fix (if needed):
flatpak override --user --reset org.pgadmin.pgadmin4
rm -rf ~/.local/share/pgadmin-fix
This creates avirtual environment with the compatible paramiko version and configuring the Flatpak application to prioritize it in the Python path, without affecting the system-wide Python installation.
Tested on: KDE Neon with pgAdmin4 Flatpak version 9.7
Same here, not able to connect to any SSL Tunnel.
Temporal solution for mac silicons
$ cd /Applications/pgAdmin 4.app/Contents/Frameworks/Python.framework/Versions/3.13/bin
$ sudo ./pip3 uninstall paramiko
$ sudo ./pip3 install paramiko==2.11.0
And restart pgadmin
It did not work using the steps you provided @yasmin-11. Here's the error message:
connection failed: connection to server at "
@EddySoeparmin235 Your error usually means one of these things:
- In pgAdmin, you might be mixing up your SSH and Postgres credentials. Remember: SSH username/password (or key) go in the SSH Tunnel tab, and Postgres username/password go in the Connection tab.
- On your server, pg_hba.conf may not allow connections from localhost.
My fix is for DSSKey because newer versions of Paramiko removed support for old DSA keys.
Same here on Ubuntu 22.04.05 LTS
@yasmin-11 Not sure what or how I entered the remote password incorrectly earlier, but now it's working. Thanks a lot.
I do hope that pgAdmin team fixes the Paramiko issue soon for other people because this is a show stopper. If I didn't come to this forum, I'll be SOL.
Same here on Ubuntu 24.04 (actually Linux Mint). To revert to pgadmin4 version 9.6:
sudo apt install pgadmin4=9.6 pgadmin4-server=9.6 pgadmin4-desktop=9.6 pgadmin4-web=9.6
All,
As mentioned in the ticket, we’ve pinned Paramiko to version 3.5.1. Could someone please test the nightly build and let us know if the issue is resolved? Nightly Build