![]() ![]() Once you login to remote host open command prompt and try to connect Windows Command prompt Start -> Run (cmd.exe) Ĭonnection should be succesful and you from there on assuming you have the MySQL cli version for windows installed you can use to login to remote SQL via SSH tunnel with Ĭ:Users\hipo> mysql -u root -h localhost -p Once click Open you will be prompted for username on remote host in my case to my local router 83.228.93.76. ! in order to make tunneling possible you will need to have opened access to SSH port of remote (Destination) host – IP address or host of remote host with number of port to which SSH tunnel will be opened. – port on which SSH tunnel will be binded on your Windows (localhost / 127.0.0.1) in this example case 3306. Open Putty Navigate in left pane config bar to: To create new SSH tunnel in putty to MySQL port 3306 on localhost (3306) – be sure MySQL is not running on localhost □ In that case Putty's Tunneling capabilities comes handy especially if you don't have a Linux box at hand. Other useful case would be if you have to access directly via CLI interface an SQL server lets say MySQL (remote port 3306 filtered) and inaccessible with mysql cli or Oracle DB with Db listener on port 1521 (needed to accessed via sqlplus). To test directly tomcat best thing is to create SSH tunnel between remote host 11444 and local host through 11444 (or any other port of choice). ![]() Once "real life" case of SSH tunnel is whether you have to deploy an application which fails after deployment with no meaningful message but error is returned by Apache Reverse Proxy. Another important great think of SSH tunnels is all information between Remote server and local PC are transferred in strong SSH crypted form so this adds extra security level to your communication. ![]() Usually on well secured networks direct access to Tomcat application server will be disabled to its listen port (lets say 11444). Very common scenario where tunneling comes handy if you have a Tomcat server behind firewalled DMZ| / load balancer or Reverse Proxy. So why would one want to make SSH tunnel to a Windows host? Lets say your remote server has a port filtered to the Internet but available to a local network to which you don't have direct access, the only way to access the port in question then is to create SSH tunnel between your computer and remote machine on some locally binded port (lets say you need to access port 80 on remote host and you will access it through localhost tunneled through 8080). This can be done with multiple SSH clients but probably quickest and most standard way is to do create SSH tunnel with Putty. Another interesting thing is how to make SSH tunnels on Windows. Earlier I blogged how to create SSH tunnels on Linux. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |