Launch ssh command in before connect not working
See original GitHub issueHi,
If I launch this command in shell (not in DBeaver)
ssh -L 3133:ip:5433 user@server -N
And I click on Test connection in DBeaver, it works.
If I kill my command in shell, add in DBeaver same command in “Before Connect” and click on Test connection, it not works. I have this error
Connection to 127.0.0.1:3133 refused. Check that the hostname and port are correct and that the postmaster is accepting TCP/IP connections. java.net.ConnectException: Connexion refusée (Connection refused)
Version of DBeaver I use : dbeaver-ce_4.0.7_amd64.deb
Issue Analytics
- State:
- Created 6 years ago
- Comments:14 (6 by maintainers)
Top Results From Across the Web
SSH config file - Run command before connection
ssh /config file. I have tried with options "ProxyCommand" and "LocalCommand" but it doesn't work. ProxyCommand: seems it run the command, ...
Read more >How do I run a local command before starting SSH connection ...
For OpenSSH you can specify a LocalCommand in your ssh config ( ~/.ssh/config ). But for that to work you also need the...
Read more >SSH client: port knocking (execute command before connecting)
Install the knock program by running sudo apt-get install knockd · Make a script in ~/bin to establish the SSH connection for the...
Read more >How To Run / Execute Command Using SSH - nixCraft
Describes how to run or execute a command using SSH with various command-line techniques on Linux, macOS, BSD, and Unix.
Read more >Can I execute some commands when starting ssh session ...
Neither -t option for ssh , nor -l option for bash will lead to login shell on their ... not bash 's -...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Environment: macOS Other Details:
/bin/bash dbeaver.sh
FWIW,
I had a lot of issues trying to leverage commands within the shell executor that DBeaver started. It all came down to Dbeaver starting a shell execution with a different $PATH than my usual.
standard PATH within running script:
/usr/bin:/bin:/usr/sbin:/sbin
Probably this happens because DBeaver doesn’t make any pause before ssh command execute and connection attempt (so SSH doesn’t have a chance to establish tunnel before db connect). I’ve added extra config parameters:
Try this in 4.1.0.