noobschools.blogg.se

Putty ssh tunneling
Putty ssh tunneling











You can use both localhost or 127.0.0.1 interchangably. In the sample above we create SSH tunnel from local port 3306 on our computer to port 3306 on. To create a tunnel use the following command: $ ssh -L 3306:127.0.0.1:3306 password: If successful the confirmation message is displayed.Ĭreating SSH Tunnel From Linux or MacOS X Open MySQL Workbench and enter the hostname as 127.0.0.1 and port 3306 (unless different above).Įnter your password for MySql on the remote machine. After you're successfully connected do not close the PuTTY window because it has the SSH Tunnel to the remote server. You will need to enter username and password.

putty ssh tunneling

It will start SSH connection to remote server. If your mysql server uses another port, ammend as such. On the Category page, choose Connection -> SSH -> Tunnels. Open PuTTY and enter the server hostname or IP address.This doesn't just have to work with MySQL, it can be used for any TCP based service, such as HTTP on port 80. The port will be accessable on your local machine, but will be automatically forwarded to the remote machine so it appears as if you're remote service (MySQL in this case) is actually local. This is useful if you don't want to open MySQL to the outside world on your remote server - a must for security.Ī tunnel is a exactly as the name suggests, a tunnel over SSH on which we'll forward a specific port. We will use this tunnel to connect to a MySQL database server on the remote server.

putty ssh tunneling

PUTTY SSH TUNNELING HOW TO

In this tutorial we'll learn how to create SSH tunnel from our computer to the server. Previously in the article How to connect to a Linux server using secure shell (SSH) we learned how to connect to Linux server via SSH from Linux or MacOS X using OpenSSH client, or from Windows using PuTTY. Need Hosting? Try ours, it's fast, reliable and feature loaded with support you can depend on.











Putty ssh tunneling