3

I'm using WinSSHD on my server.

I can connect locally on the server via telnet&management studio, specificing the port 1433. I have allowed remote connections.

I can telnet from my local computer at localhost 14333(local port) and get the correct telnet prompt up.

But when I try to connect via management studio locally to localhost,14333 I get

TITLE: Connect to Server

Cannot connect to localhost,14333.


ADDITIONAL INFORMATION:

A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: TCP Provider, error: 0 - No connection could be made because the target machine actively refused it.) (Microsoft SQL Server, Error: 10061)

What a classic error message.

Is there any special reason this isn't working? Considering telnet is working via ssh, I thought I was home and dry.

1
  • If it were me, I would try to take the shenanigans out of it. Namely, you've got SSH sitting between you and the SQL process. See if you can connect with SSMS on 14333. That the error message says "the target machine actively refused it" is usually an indication to me that I have the wrong port. Also, what are you trying to accomplish with ssh? You can secure a connection with an SSL certificate installed on the server side. Commented Mar 26, 2012 at 2:53

2 Answers 2

0

something else is at play here. I have successful got management studio to work over ssh, even with winsshd without issue.

Is SQL Server running as a default instance? May we see the port forwarding settings your using in your ssh/putty client?

1

Although this isn't the real answer, I found that when I used http://www.bitvise.com/tunnelier It worked correctly.

I had to use ip, not hostname, but 127.0.0.1,14333 worked.

I'm guessing it's some kind of putty-> winsshd issue?

1
  • SSMS (and other SQL Server clients?) require 127.0.0.1,<listening port> so this is likely the answer (assuming target is a SQL Server default instance). localhost,<listening port> does not map to 127.0.0.1 per similar forum posts in SO. I'm investigating SSH tunneled connection to a SQL Server "named instance". For named instance I believe a different port is assigned, but looking for specifics before posting as candidate answer :-). docs.microsoft.com/en-us/sql/sql-server/install/… Commented Feb 5, 2019 at 5:31

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.