Not able to connect with my VM (Linux -redhat 8.2) via RDP

BHANU SINGH 1 Reputation point
2020-09-05T15:48:14.607+00:00

Hello, I have provisioned one VM (Linux (redhat 8.2)) in Azure, now I wanna enable RDP by using SSH command. but it got failed, after login, I am using the following command to enable RDP.

sudo apt-get update
sudo apt-get -y install xfce4

Not Monitored
Not Monitored
Tag not monitored by Microsoft.
40,184 questions
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Sumarigo-MSFT 47,206 Reputation points Microsoft Employee
    2020-09-07T05:09:55.38+00:00

    @BHANU SINGH Are you getting any error message or code, If so can you please share the screenshot of the error?

    If the VM is new, your best bet is to recreate the VM.

    Refer here How to Install and configure Remote Desktop to connect to a Linux VM in Azure

    This documentation for troubleshooting Linux virtual machines in Azure.

    This article helps you find and correct the problems that occur due to Secure Shell (SSH) errors, SSH connection failures, or SSH is refused when you try to connect to a Linux virtual machine (VM). You can use the Azure portal, Azure CLI, or VM Access Extension for Linux to troubleshoot and resolve connection problems. Troubleshoot SSH connections to an Azure Linux VM that fails, errors out, or is refused

    Don't forget you need access to TCP port 3389.

    If you have diagnostics enabled on the Linux VM, you can use the serial console. Just click on the VM in the Azure Portal -> Serial Console.

    Hope this helps!

    Kindly let us know if the above helps or you need further assistance on this issue.

    ---------------------------------------------------------------------------------------------------------------------------------------------------

    Please don’t forget to "Accept the answer” and “up-vote” wherever the information provided helps you, this can be beneficial to other community members.


  2. Marisa Dean 1 Reputation point
    2021-02-01T17:13:59.457+00:00

    RedHat does not use apt, so apt-get commands won't work. It uses rpm and yum.

    You cannot "RDP" to a RedHat server either, if you mean access to a graphical desktop you would use Console, VNC or SSH forwarding which I believe is your aim

    For these I recommend installing this package

    yum groupinstall "Server with GUI"
    systemctl start graphical.target
    

    Then try connect, if you are happy you make this change permanent with

     systemctl set-default graphical.target
    
    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.