Using SQL Server Management Studio to remote connect to docker container

noobmaster69 picture noobmaster69 · Dec 27, 2017 · Viewed 25k times · Source

Context: I am trying to build a development SQL Server that I can continue to learn SQL on and use Microsoft SQL Server Management Studio (SSMS) to access on a Windows PC.

So I have the AdventureWorks database sitting on a Docker Container for MS SQL Server 2017 running on a DigitalOcean Ubuntu 16.04 box. From my Mac I can remote SSH in to the server, access the container and query the database.

However I wish to use SSMS on my Windows PC and am unsure how I begin to connect to the remote box. In the picture below, there are no options to specify an SSH key or to even login in to the Ubuntu box, only to access the SQL server.

enter image description here

Is this even possible?

Answer

paul stanton picture paul stanton · Jan 5, 2018

connect via SSMS using the public IP address, followed by comma separator and then the port (xxx.xx.xx.xxx,port)

You'll also need the sa credentials to make this work.