Use Navicat's SSH tunnel and SECURECRT port forwarding to connect a remote database server to which the native IP is blocked

Source: Internet
Author: User
Tags server port ssh port ssh server

For security reasons, the database server is typically deployed only on the intranet, or if it is deployed on a public network, but only for certain designated IPs. But if the data is eventually queried by the public, there will always be a channel to access the database. The following uses Navicat and SECURECRT to achieve database access to two different scenarios.
Scenario One: The database server opens the SSH service on the public network
method One: Take advantage of navicat SSH tunnel configuration in Navicat:
    • General Tab:
Host NAME/IP Address: Domain name or IP addresses of database servers port: Database port (e.g. mysql:3306) User name: Database connection username password: Database connection password
    • SSH tab:
Tick "Use SSH tunnel" Host NAME/IP address: The domain name or IP address of the database server port:ssh port number (e.g.) User name:ssh username Password:ssh user's password tick "Save Password "Click "Test Connection" to connect successfully.
method Two: Using the port forwarding function of SecureCRT SECURECRT Configuration:1. Create a new session, SSH connection to database server 2, session options, port forwarding, add ... Local-to-port: Enter a number between 1024~65535 to listen for local NAVICAT requests remote-port: Enter the port for the database service (such as mysql:3306) navicat Configuration:
    • General Tab:
Host name/ip Address: Fill in Localhostport: Fill in securecrt "Local port" value User name: Database connection user name password: Database connection password Click "Test Connection" The connection was successful.

Scenario Two: Database Server C network, public network Server B open the SSH service, public network server can connect C, local machine a need to use Navicat connection CThe configuration method is similar to method two in scenario one, where it differs: securecrt configuration:
Remote: Check "destination host differs from SSH server", hostname: Fill in C IP address

Use Navicat's SSH tunnel and SECURECRT port forwarding to connect a remote database server to which the native IP is blocked

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.