Unable to perform ssh tunneling with HeidiSQL and wine

[expired user #11171]'s profile image [expired user #11171] posted 6 years ago in General Permalink

I'm using wine wine-3.0-rc4 and HeidiSQL_9.5.0.5196 on 4.14.9-1-ARCH archlinux x64. I would like to solve this also to help other people experiencing the same issue.

Claudio

ansgar's profile image ansgar posted 6 years ago Permalink

Please describe the problem more exactly.

[expired user #11171]'s profile image [expired user #11171] posted 6 years ago Permalink

First thanks for your kindness, When i try to connect to my server by using plink it seems that nothing happens. After several minutes it says "unable to connect". The strange Thing is that before upgrading all worked like a charm. In addition by using the same parameters in other softwares I am still able to connect to my server. Please tell me how can i give you additional informations.

[expired user #11171]'s profile image [expired user #11171] posted 6 years ago Permalink

I've noticed that if I use only plink without -N option I am able to log into my server...

ansgar's profile image ansgar posted 6 years ago Permalink

That sounds as if plink is waiting with some prompt so it can go on with connecting. Perhaps the question for storing a new or changed host key is somewhere in the background?

ansgar's profile image ansgar posted 6 years ago Permalink

-N means:

don't start a shell/command (SSH-2 only)

I highly guess this is some configuration problem on the SSH server.

[expired user #11171]'s profile image [expired user #11171] posted 6 years ago Permalink

The strange thing is that if I launch hedisql on my virtualbox it works with the same parameters. Do you think there are some problems in wine?

ansgar's profile image ansgar posted 6 years ago Permalink

That would be strange if Wine would be to blame. If HeidiSQL + plink versions and parameters are all the same...?

[expired user #11171]'s profile image [expired user #11171] posted 6 years ago Permalink

It seems... I've downgraded to wine-2.0.3... Still not working. In my virtualbox with same version of plink and heidsql and same settings..all working. How can I provide additional informations?

[expired user #11171]'s profile image [expired user #11171] posted 6 years ago Permalink

Launching plink.exe with wine (same parameters I used in virtualbox) I obtain:

Local port 3307 forwarding to 127.0.0.1:3306 failed: Network error: Permission denied

[expired user #11171]'s profile image [expired user #11171] posted 6 years ago Permalink

Ok, for those who are experiencing my same problem:

Error was in the /etc/hosts file... Just edit /etc/hosts and insert the same string you find in /etc/hostname, so for example:

/etc/hostname archlinux

your /etc/hosts should be:

127.0.0.1 archlinux.domain.org localhost.localdomain localhost archlinux

Heidisql was workinkg like a charm, the problem was in plink.exe that was not able to resolve localhost due to this misconfiguration.

Thanks to everybody for their help.

leonardomaiacosta's profile image leonardomaiacosta posted 5 years ago Permalink

On linux uyou can run comand on terminal:

ssh -o 'StrictHostKeyChecking no' -L 3307:127.0.0.1:3306 -f -N -i /home/$USER/.ssh/id_rsa sc_dev@DATABASE_IP

funciona como um proxy reverso todas as conexoes locais na porta 3307 serao encaminhadas para o servidor do banco de dados especificado no comando, ou seja quando criar a conexão criar como conexão comum local

leonardomaiacosta's profile image leonardomaiacosta posted 5 years ago Permalink

On linux uyou can run comand on terminal:

ssh -o 'StrictHostKeyChecking no' -L 3307:127.0.0.1:3306 -f -N -i /home/$USER/.ssh/id_rsa sc_dev@DATABASE_IP

works as a reverse proxy all local connections on port 3307 will be forwarded to the database server specified in the command, ie when creating the create connection as local common connection

marcelorsoares's profile image marcelorsoares posted 5 years ago Permalink

Thank you, this worked for me!

On linux uyou can run comand on terminal:

ssh -o 'StrictHostKeyChecking no' -L 3307:127.0.0.1:3306 -f -N -i /home/$USER/.ssh/id_rsa sc_dev@DATABASE_IP

works as a reverse proxy all local connections on port 3307 will be forwarded to the database server specified in the command, ie when creating the create connection as local common connection

Please login to leave a reply, or register at first.