Remote Desktop Connection between PCs -- Must they both be in the same Subnet?

Click For Summary
Remote Desktop Protocol (RDP) connections typically require both devices to be on the same local area network (LAN), although there are workarounds for remote access, such as using VPNs or port forwarding. Users have noted that TeamViewer and AnyDesk are often preferred for remote connections due to their ease of setup compared to RDP. When attempting to connect to SQL Server, issues often arise from misconfigurations, such as not enabling TCP/IP or named pipes in the server properties. For remote SQL Server access, proper configuration and understanding of network protocols are essential, as errors can indicate deeper connectivity issues. Overall, while RDP can be used for remote connections, alternative methods may be more user-friendly and secure.
  • #31
Thanks, I thought I had included the server properties; clearly not. Coffee shop closed for today, will post ASAP

v
 
Computer science news on Phys.org
  • #32
For something very straightforward and with no technicalities, I use a program called anydesk. Very sweet if you ask me.
 
  • Like
Likes WWGD
  • #33
WWGD said:
True but , it takes $$$ for quality VPN last I checked.

Some VPNs provide a small amount of traffic at no charge. I've used the free tier of Windscribe and TunnelBear before, and they are okay for testing, at least.

But I agree with @rbelli1, using RDP without really understanding what you are doing is a quick way to be hacked...and you won't even know it!

There are numerous bad actors polling the internet looking for poorly protected machines to attack - I set up a Linux server on Azure for a project with an IP that was not advertised and within a day the root user account was being pinged at the rate of two password tries every second.
 
  • #34
Tghu Verd said:
I set up a Linux server on Azure for a project with an IP that was not advertised and within a day the root user account was being pinged at the rate of two password tries every second.
Never enable password login on a public machine, login should be by public key only.
 
  • #35
pbuk said:
Never enable password login on a public machine, login should be by public key only.

Correct, and this wasn't. But that does not stop attackers from trying root...and other common system user names.
 
  • #36
@pbuk : Sorry for the delay. Here are the server properties of my instance: Upper half of default connection settings re allowing named pipes to use ODBC:

1579557085498.png


1579557180635.png
 
  • #37
Remember the error came about when I was trying to access my instance through sqlcmd in the command line. I just need, for my interview, to know how to access SQL Server without using SSMS, so I may also give Pyodbc a shot, so don't worry of you're too busy; you have helped me plenty as it is.

EDIT: Error message when trying to use sqlcmd to connect:

Sqlcmd: Error: Microsoft ODBC Driver 13 for SQL Server : Named Pipes Provider: Could not open a connection to SQL Server [2]. .
Sqlcmd: Error: Microsoft ODBC Driver 13 for SQL Server : Login timeout expired.
Sqlcmd: Error: Microsoft ODBC Driver 13 for SQL Server : A network-related or instance-specific error has occurred while establishing a connection to SQL Server. Server is not found or not accessible. Check if instance name is correct and if SQL Server is configured to allow remote connections. For more information see SQL Server Books Online..
 
  • #38
WWGD said:
Remember the error came about when I was trying to access my instance through sqlcmd in the command line. I just need, for my interview, to know how to access SQL Server without using SSMS, so I may also give Pyodbc a shot, so don't worry of you're too busy; you have helped me plenty as it is.
pyodbc is not going to help, the problem the error messages are telling you is that that the ODBC driver cannot connect to SQL Server so pyodbc -> ODBC -> SQL Server will have exactly the same problem as sqlcmd -> ODBC -> SQL Server.

I think the fundamental problem is that you are exposing yourself to a lot of stuff you don't need to know how to do - set up and mangage connections to a MS SQL Server instance. And the deeper you go, the deeper you are getting into unrelated stuff like network protocols. It's like building an aeroplane yourself from a set of blueprints when what you really want to do is learn to fly!

A last stab in the dark, I'm not convinced that your server is exposing a named pipes connection, have you tried just connecting to the server DESKTOP-QH...\PYTHONRSQLSERVER, or possibly just DESKTOP-QH..., or possibly with the default SQL Server port number DESKTOP-QH...,1466
 
  • Like
Likes WWGD
  • #39
pbuk said:
pyodbc is not going to help, the problem the error messages are telling you is that that the ODBC driver cannot connect to SQL Server so pyodbc -> ODBC -> SQL Server will have exactly the same problem as sqlcmd -> ODBC -> SQL Server.

I think the fundamental problem is that you are exposing yourself to a lot of stuff you don't need to know how to do - set up and mangage connections to a MS SQL Server instance. And the deeper you go, the deeper you are getting into unrelated stuff like network protocols. It's like building an aeroplane yourself from a set of blueprints when what you really want to do is learn to fly!

A last stab in the dark, I'm not convinced that your server is exposing a named pipes connection, have you tried just connecting to the server DESKTOP-QH...\PYTHONRSQLSERVER, or possibly just DESKTOP-QH..., or possibly with the default SQL Server port number DESKTOP-QH...,1466
Thanks, I can connect through SSMS and have done queries, etc, but I am trying to connect from outside of SSMS and, of course, learn whatever possible. EDIT: As part of a list of reqs given for a Data job.
 
  • #40
WWGD said:
Thanks, I can connect through SSMS and have done queries, etc, but I am trying to connect from outside of SSMS and, of course, learn whatever possible.
Yes but SSMS does not use ODBC so to get ODBC working you need to tell the ODBC Driver to connect to the same connection as SSMS is using, which is the one at the bottom of the window and it doesn't seem to be a named pipe.
 
  • Like
Likes WWGD

Similar threads

Replies
13
Views
2K
  • · Replies 11 ·
Replies
11
Views
2K
  • · Replies 4 ·
Replies
4
Views
21K
Replies
2
Views
2K
  • · Replies 12 ·
Replies
12
Views
4K
Replies
2
Views
4K
  • · Replies 1 ·
Replies
1
Views
3K
Replies
5
Views
3K
Replies
10
Views
5K
  • · Replies 19 ·
Replies
19
Views
14K