How to SSH from XAMPP to Server?

Problems with the Windows version of XAMPP, questions, comments, and anything related.

How to SSH from XAMPP to Server?

Postby redknigh6 » 12. July 2015 20:49

Hi,
I am trying to do a MySQL replication of a remote Master DB with my local Slave DB on XAMPP.
The problem is the Remote Master can only be accessed using SSH to tunnel into the server to access the MySQL DB.
How can I do that from XAMPP. I tried the "ssh" command from the shell but it is not recognized. Do I need to install an add-on for SSH?
Is what I am trying to do possible with XAMPP? Is there a easier way?

I am running XAMPP on Windows 7.

Thanks,
redknigh6
 
Posts: 2
Joined: 12. July 2015 20:39
Operating System: Windows 7

Re: How to SSH from XAMPP to Server?

Postby glitzi85 » 12. July 2015 21:51

As far as I know there is no built-in ssh support in MySQL. Also ssh is not part of windows. You need an client, I think the most popular one for windows is putty: http://www.chiark.greenend.org.uk/~sgta ... nload.html

If you need to automate the whole thing (e.g. you are running the XAMPP MySQL Server as a windows service) then this is going to be a bit more tricky. I've found a tool that seems to run as a service and builds a ssh connection in the background using plink: http://nemesis2.qx.net/pages/MyEnTunnel However, I just found this by googling, I did not try it!

In all cases I would strongly recommend using Public-Key-Authentication for SSH instead of Passwords, especially in scripting this will make your life so much easier.
User avatar
glitzi85
 
Posts: 1920
Joined: 05. March 2004 23:26
Location: Dahoim

Re: How to SSH from XAMPP to Server?

Postby redknigh6 » 15. July 2015 05:45

Thanks for the advises, I ended up using PuTTY to do the SSH and Public-Key Auth.
To automate, I just had PuTTY and XAMPP load on Windows startup. PuTTY freeze up sometime at startup (not sure why) so it's kind of annoying.
Will probably move away from Windows to do all this soon.
redknigh6
 
Posts: 2
Joined: 12. July 2015 20:39
Operating System: Windows 7

Re: How to SSH from XAMPP to Server?

Postby glitzi85 » 15. July 2015 22:58

Moving away from Windows sounds like a good idea in this case. In the meantime have a look at plink (same download page as putty), it is the command line interface intended to run in an automated environment.
User avatar
glitzi85
 
Posts: 1920
Joined: 05. March 2004 23:26
Location: Dahoim


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 137 guests