Accessing SQL Server over an SSH tunnel

前端 未结 4 1615
半阙折子戏
半阙折子戏 2021-01-02 15:06

In my development shop, we deploy code on virtual servers that sit on a remote network.

We access the machines on that network by first opening an SSH connection to

相关标签:
4条回答
  • 2021-01-02 15:19

    For Authentication type Azure Active Directory - Universal with MFA (Mutli-Factor Authentication), in addition to specifying the port correctly (127.0.0.1,3398), I also had to point the host to localhost.

    On Windows, I had to edit my hosts file to include the server host:

    127.0.0.1    server.example.com
    

    Then, in SSMS, I could connect to server.example.com,3398, which would perform the MFA correctly.

    I could have performed this redirection at a higher DNS level as well.

    0 讨论(0)
  • 2021-01-02 15:24

    The issue is probably that SSMS is trying to access the SQL Server Browser Service, which is UDP port 1434. Take a look at http://technet.microsoft.com/en-us/library/cc646023.aspx for an overview of the additional ports you may need to forward to get this to work.

    0 讨论(0)
  • 2021-01-02 15:41

    Instead of connecting to localhost:3398 Use 127.0.0.1,3398

    0 讨论(0)
  • 2021-01-02 15:42

    I'm pretty sure I figured out the answer to this, actually.

    On the remote network (which we don't control), for security purposes, it appears that the database servers are set up to ignore database requests coming from the gateway machine. So I guess there's just no good solution short of convincing them to give us full VPN access. Thanks everyone for your help.

    0 讨论(0)
提交回复
热议问题