mariovaldez.net
http://www.mariovaldez.net/webapps/forums/

have SSH access but can't use it...
http://www.mariovaldez.net/webapps/forums/viewtopic.php?f=12&t=210
Page 1 of 1

Author:  slaxin [ 10 Mar 2005, 13:54 ]
Post subject:  have SSH access but can't use it...

Hello,
First I want to thank Mario for all his work on this software. I just discovered it today and am excited to use it in the future.

I can connect to my database just fine if I have the "Use SSH" checkbox unchecked. There is no doubt that I have SSH access to the server as I use putty all the time. We have our own virtual server with root access. If I click the Test Tunnel button plink.exe opens and connects. However, if I check the "Use SSH" checkbox and then try to connect to the database I get an error dialog stating "Error while connecting to database (mydatabase @ 127.0.0.1)
SQL Error: Access denied for user: 'myuser@localhost' ..."

I don't have it configured to use localhost, I have it configured to use the proper domain name where the mysql server is. Why is it changing to localhost? Like I said before, I can connect fine without SSH...

Thanks in advance.

Author:  slaxin [ 11 Mar 2005, 12:35 ]
Post subject: 

Ok, I wasn't thinking this one through before I posted my question. All I needed to do was to grant my mysql user localhost priviledges...all is good now

Author:  mvaldez [ 12 Mar 2005, 07:22 ]
Post subject:  Why localhost... just for the record...

slaxin:

> I can connect to my database just fine
> if I have the "Use SSH" checkbox
> unchecked... if I check the "Use SSH"
> checkbox and then try to connect to the
> database I get an error dialog stating
> "Error while connecting to database
> (mydatabase @ 127.0.0.1) SQL Error:
> Access denied for user: 'myuser@localhost' ..."
> All I needed to do was to grant my
> mysql user localhost priviledges...all
> is good now

Hi. You already solved this problem, but I'll explain it anyway because some persons find a bit hard to understand the SSH tunneling.

When SSH tunneling is not enabled, the OSCPMWin application will connect directly to a MySQL server. So, the hostname used to connect is the usual server name (if local it maybe "servername", if not in the LAN, it maybe "servername.com" or "www.servername.com"). The server will receive the connection and it will see the OSCPMWin connection as coming from the IP number of your workstation.

On the other hand, when SSH tunneling is enabled, the application first will launch PLink to make the SSH connection to the server. So, PLink will connect using the "servername" or "www.servername.com" (or something like that) and the SSH daemon in the server will receive the connection from the IP number of your computer.

However, after the SSH tunnel is established, the MySQL connection won't be done directly between the server and the OSCPMWin application. The OSCPMWin application will connect to localhost (or 127.0.0.1), that is, your own workstation. PLink, running in your workstation will receive the connection and will encrypt it and redirect it to the SSH server. In the server, the SSH daemon receive the tunnel request and then redirect the connection to the local MySQL daemon. So, for MySQL, the connection is not coming from the IP of your workstation, but it is coming from the SSH daemon running in localhost.

That's why the MySQL user should have permissions to connect from localhost.


Regards,

Mario A. Valdez-Ramirez.

Author:  Ripper [ 11 Apr 2006, 17:23 ]
Post subject:  ssh

Hello,

I get the following error when trying ssh.

Code:
Error while connecting to database (databasename @ 127.0.0.1). SQL Error: Lost connection to MySQL server during query


I cant connect at all when ssh is not checked and get the following

Code:
Error while connecting to database (databasename @ localhost). SQL Error: Cant connect to MySQL server on "localhost' (10061)



Any ideas what I am doing wrong, first I tried without SSH using the configurations I have for oscommerce. same error as above, then tried ssh and I seem to be almost getting there.

I am hosted on a shared server and I am trying to access it remotely. In the control panel my hoster provides there is a thing for ssh access, it gives me stern warnings but lets me in to the ssh[/code]

Author:  Ripper [ 14 Apr 2006, 07:04 ]
Post subject: 

Im still having problems getting this to work, is there anything I can do. The software looks tight but cant get it to work.

Page 1 of 1 All times are UTC - 7 hours
Powered by phpBB® Forum Software © phpBB Group
http://www.phpbb.com/