Windows EC2 server cannot login through RDP

amazon ec2windows

In my Windows Server 2008 EC2 instance, when I RDP into the server, it successfully logs on, but just after the desktop appears, it logs off automatically and closes the RDP session and dis-connects from server. I've tried rebooting the server, but there is no change in behavior.

what could be reason for such behaviour? Is there any other way to login to the server?

Best Answer

It seems that you have a Start program designated (somehow) that is not able to run. Upon loging in, the Start program is failing, and your session is ended.

http://download.microsoft.com/download/8/2/f/82f0bbb9-1c53-4f2b-8a6a-9864cb4c73a5/TSWhatsNew.doc states that:

"The Group Policy setting Start a program on connection configures Terminal Services to run a specified program automatically when a client connects to a terminal server. By default, Terminal Services sessions provide access to the full Windows desktop, unless the server administrator has otherwise specified using this policy setting, or unless the user has specified during configuration of the client connection. Enabling this Group Policy setting overrides the Start program settings made by the server administrator or user. The Start menu and Windows Desktop are not displayed, and when the user exits the program, the Terminal Server session is automatically logged off. "

(Understand that Terminal Services are what provide your remote desktop in your scenario.)

The "reason for such behaviour" is likely because you have a Start program that is failing to run.

"Any other way to login to server" is doubtful. Telenet is net enabled by default, and no other remote session software such as VNC is running on the console.

Remotely Managing that computer to change the Group Policy setting "Start a program on connection" would solve your problem, but Remote Management of a server wont be possible unless the server is on a domain in which you have administrative rights.

I'm sorry to say you're stuck, unless you can figure out what that Start program is looking for, and provide it. Perhaps it needs a port opened, a code passed to its startup environment parameters, or simply a larger instance type.