question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

SSH Tunnel Permission denied

See original GitHub issue

System information:

  • Ubuntu 19.10
  • DBeaver version - 6.3.2

Connection specification:

  • Database name and version - MySQL (10.1.41-MariaDB)
  • Driver name - MySQL8+
  • Do you use tunnels or proxies (SSH, SOCKS, etc)? Yes

Describe the problem you’re observing:

When I try to connect to my server via SSH tunnel, it gives me a ‘Permission denied’ error. The ssh key works fine when using the ssh command via terminal, and also works in MySQL Workbench. Permissions are 600. See attached screenshots.

Steps to reproduce, if exist:

  • Choose SSH Tunnel in connection settings.
  • Enter hostname, port and ssh username.
  • Enter path of SSH key eg. /usr/share/dbeaver/id_rsa
  • Click connect.

Include any warning/errors/backtraces from the logs

Cannot establish tunnel
  java.io.FileNotFoundException: /usr/share/dbeaver/id_rsa (Permission denied)
  java.io.FileNotFoundException: /usr/share/dbeaver/id_rsa (Permission denied)
    /usr/share/dbeaver/id_rsa (Permission denied)
    /usr/share/dbeaver/id_rsa (Permission denied)

Screenshot from 2020-01-15 08-50-31 Screenshot from 2020-01-15 08-51-04

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:13

github_iconTop GitHub Comments

33reactions
guipassoscommented, Feb 8, 2021

Guys, I had the same problem on Ubuntu 20.04, so I needed to change the permissions of the dbeaver application as the image: Screenshot from 2021-02-08 13-10-55

It worked for me

21reactions
lemosluancommented, May 19, 2020

If someone want to use ssh keys with snap install, put the private_key on the snap directory - on ubuntu: /home/your_user_dir_name/snap/dbeaver-ce/.ssh. So, the dbeaver installation can read the key. It worked for me. 😉

Read more comments on GitHub >

github_iconTop Results From Across the Web

Permission denied for ssh -R (tunnel) - Ask Ubuntu
I tried a number of things in the /etc/ssh/sshd_config file on the home computer and the /etc/ssh/ssh_config on the work computer.
Read more >
SSH forwarding issue. "Permission Denied" - Server Fault
When I say "ssh host1.ournetwork.com" it goes to the bastion, asks for my login, accept it successfully, then tries to get to "host1",...
Read more >
localhost:81, but I received Permission denied (publickey)
I thought I needed to use ssh tunnel (the command) on the server, so I was getting the errors ok. But the command...
Read more >
Cannot access the host to connect a database via SSH ...
Cannot access the host to connect a database via SSH tunneling while getting "Permission denied (publickey)." · Get $200 to try DigitalOcean - ......
Read more >
How to fix the ssh permission denied (publickey) error
How to fix the ssh permission denied (publickey) error · BitLaunch · Run ssh -vvv user@your.vps.ip for more info · Make sure you're...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found