Plink 0.61 (downloaded from link on SSH Tunnel tab in session mgr)
XPsp3 system running HeidiSQL connecting to a FreeBSD box running MySQL 5.0.77-log
The problem I am attempting to solve is: When I attempt to connect to the ssh host HeidiSQL returns a dialog stating:
SQL Error (2013): Lost connection to MySQL server at 'reading initial communication packet', system error: 2
If I remove the path to the plink.exe location then HeidiSQL will reveal the command it is attempting to run:
plink -ssh user@host.com -pw password -P nonstdport -N -L 3307:host.com:3306
ssh runs on a non-std port, mysql runs on std port 3306
So, to troubleshoot this problem I open an XP cmd window and run the plink command (with the correct params for my server/host/ports) without the -N option everything works fine. I get a shell prompt, can run a command line into mysql, execute any query against the db, logout of mysql, logout of the shell, and get a DOS prompt back
If I run the above command with a -v option from the DOS command line to see the extra output I get:
Looking up host "<host.com>"
Connecting to <ip> port <port>
Server version: SSH-2.0-OpenSSH_4.3
Using SSH protocol version 2
We claim version: SSH-2.0-PuTTY_Release_0.61
Doing Diffie-Hellman group exchange
Doing Diffie-Hellman key exchange with hash SHA-1
Host key fingerprint is:
ssh-rsa 2048 <some key>
Initialised AES-256 SDCTR client->server encryption
Initialised HMAC-SHA1 client->server MAC algorithm
Initialised AES-256 SDCTR server->client encryption
Initialised HMAC-SHA1 server->client MAC algorithm
Using username "miked".
Using SSPI from SECUR32.DLL
GSSAPI authentication request refused
Access denied
Access denied
Sent password
Access granted
Opened channel for session
Local port 3306 forwarding to <host.com>:<port>
Allocated pty (ospeed 38400bps, ispeed 38400bps)
Started a shell/command
Last login: Mon Sep 26 10:34:30 2011 from <ip>
Thought I'd check here first before reporting a bug to see if I've missed something on my end.