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

Click For Summary

Discussion Overview

The discussion revolves around the requirements and methods for establishing Remote Desktop Protocol (RDP) connections between PCs, particularly whether both devices must be on the same subnet or LAN. It also touches on alternative remote connection tools and issues related to accessing SQL Server.

Discussion Character

  • Debate/contested
  • Technical explanation
  • Exploratory

Main Points Raised

  • Some participants suggest that RDP connections require both computers to be on the same network, questioning how a connection can be established with just a computer name.
  • Others propose that there are workarounds for connecting remotely, such as using port forwarding or VPNs, although concerns about security are raised regarding port forwarding.
  • One participant expresses a preference for Teamviewer over RDP due to its ease of setup, especially when devices are not on the same network.
  • There is a discussion about accessing SQL Server via named pipes, with some participants clarifying that named pipes are typically used for local connections only.
  • Participants discuss the challenges of connecting to SQL Server from the command line, with one noting an error message related to named pipes.
  • Some participants suggest using Azure for SQL Server access as an alternative to local setups.
  • There is a mention of using client certificates for VPN setups to enhance security.

Areas of Agreement / Disagreement

Participants do not reach a consensus on whether RDP connections require both devices to be on the same subnet, as some assert it is necessary while others provide alternative methods. The discussion about SQL Server access also remains unresolved, with differing views on the appropriate connection methods.

Contextual Notes

Participants express uncertainty regarding the specifics of their setups, such as whether they are using local or virtual machines, and the implications this has for connection methods. There are also mentions of potential security risks associated with different remote access methods.

  • #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   Reactions: 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   Reactions: 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   Reactions: WWGD

Similar threads

Replies
13
Views
2K
  • · Replies 11 ·
Replies
11
Views
3K
  • · 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