1

I am working with an AWS environment containing

  • a Ubuntu server to which I can establish an SSH connection
  • a MySQL server
  • an MS SQL server

I can SSH into the Ubuntu server and from there verify connectivity to the MySQL server on port 3306, and the MSSQL server on port 1433 via telnet.

However, if I specify local port forwarding like this in my SSH connection:

 -L 1439:MsSqlIp4Addr:1433 -L 3310:MySqlIp4Addr:3306 

From my local machine/client I can verify the connection to the MySQL server via telnet 127.0.0.1 3310. But when I attempt to connect to the MSSQL server via telnet 127.0.0.1 1439, it just hangs for ~100 seconds and then returns "Connection closed by foreign host".

I've tried swapping the local ports to make sure there was no conflict, and I can consistently connect to the MySQL server but not the MSSQL server.

Any ideas?

1
  • How do you “test” with telnet? Do you expect a "Connected to..." message or are you waiting for the server's banner (only applies to some protocols)? Commented Feb 8, 2020 at 4:31

1 Answer 1

1

Oddly enough, even though telnet doesn't work, I can still connect to the SQL Server by specifying 127.0.0.1,1439 using standard SQL Server tools.

Don't know why telnet hangs when testing locally but not on the remote machine. I guess that just means it's not a valid test of connectivity.

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.