DBeaver: connecting to a PostgreSQL database server through SSH: can't initialize tunnel, auth fail
I tried DBweaver on Kubuntu and had the same issue. It looks like the issue is around the fact that the authenticity of the SSH server hadn't been verified beforehand, and DBweaver and unable to cascade the correct error message (e.g., Host key verification failed.) and instead misleadingly blames some authentication error.

I fixed the issue on Kubuntu as follows:


Disable the SSH Tunnel:





Run in the shell sudo apt-get install -y autossh
Add the shell command in your connection in DBeaver:

autossh -f -N -L 5432:localhost:5432 ssh_server_username@ssh_server_ip






At that point if you try to connect you'll have the same com.jcraft.jsch.JSchException: auth fail error message. Go to the shell and run the command:

ssh -f -N -L 5432:localhost:5432 ssh_server_username@ssh_server_ip


it will output: 

The authenticity of host 'ssh_server_hostname (ssh_server_ip)' can't be established.
ECDSA key fingerprint is 29:13:b5:cb:99:21:b2:18:f1:11:aa:12:54:c2:88:9a.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added 'ssh_server_hostname,ssh_server_ip' (ECDSA) to the list of known hosts.
Password: 


Go back to DBeaver, try to connect, that should work. I still don't know why I should use autossh instead of the SSH tunnel tab in DBeaver though.