Disconnecting an RDP session without logging off remote user

Disconnecting an RDP session without logging off remote user

avatar

We have a number of remote servers across our organization that are logged in locally and running programs.

I am after a way of connecting to these servers via a console connection using RDP so in order to make necessary changes and then disconnect, but i don't want to log off the remote user when finished, so another team member can log in in the future and continue without having to log on locally to the server.

I have set to automatically logoff to no when disconnecting but it still logs off

In the past VNC was used for this, but there is push to move away from VNC for direct server access,

any extra options I can try?

Cheers

All Comments (3)

avatar

Hi,

When you say you don't want to logoff the remote user when finished, do you mean you wish to disconnect while leaving the Windows session inactive on the server, such that you can reconnect to it later? This is the default behavior, and RDP doesn't have a proper way to logoff on disconnection, which is why I'm confused here.

You mention VNC, which is often used to connect to the *current* session without bumping the current user. Did you really mean you wish to connect to see the same thing the user physically present at the computer would see, which is not what RDP does?

Best regards,

Marc-André Moreau

avatar

Hi Marc-Andre,

thank you for your reply,

yes, to your second paragraph, we have a server in a remote location locked in a server room in a building that is 95% unoccupied, it is running legacy software through a VM that requires the nominated user to remain logged in, people then remote in, check settings and make changes if necessary then leave, but without the session logging off.

During testing whenever reconnect to the machine it has appeared that it has logged off and requesting us to re login, because the software it is running is legacy when the user logs off certain processes stop running and then things start to crash.

Hope this makes more sense?

Cheers

avatar

Hi,

I think I may know what's going on here, tell me if this makes sense to you:

You leave a machine in a server room running 24/7 with a legacy software application, logged in, and most likely with a physical monitor attached. Most access is done remotely but you wish to do it as if you were physically in the server room, not disturbing the legacy software application with session changes that happen with RDP normally.

Think about it for a second: if you had a full session logoff, the session would no longer exist in the server, and the application would therefore no longer be running. The feature you've originally asked about is meant to do a full session logoff, and you've tried turning it off, thinking it would work around the problem, but it doesn't.

Here's what happens when you disconnect, but not logoff, with RDP: the session remains but goes into an inactive state. While inactive, many applications misbehave because Windows stops all graphic rendering. Win32 applications no longer have an active "message pump" which is quite important. They're just frozen, and that's a long-standing known issue with RDP in Windows. We've tried long ago to modify how Windows works to avoid this, but it's deep in the internals of Windows, too dangerous to fiddle with.

This is what I suspect happens here, and why VNC worked: unlike RDP, VNC will connect to the existing Windows session (the physical one, attached to the physical monitor) without causing even just a temporary session switch. This leaves the legacy software application undisturbed by RDP which would make the session inactive while disconnected.

I suggest you keep using VNC or alternatives to RDP, they should avoid causing issues with your legacy application. Maybe try AnyDesk, I think it should work too.

Best regards,

Marc-André Moreau