INTRO
We have already discussed on RDP topic. where I told you about how you can connect with a Windows RDP using the Linux tool “Remmina”. You can read more on this topic fromĀ HERE.
Have you ever purchased any cloud services? such as AWS, Google Cloud, and Azure. By the way, it doesn’t matter if you have bought it or not. you can just use your local Linux machine here. well, you will see that you only have the CLI user interface to work with. that requires SSH(port 22) protocol. It is not a problem for you if you are good with Linux commands. But if you are a beginner or not familiar with CLI then you may want GUI with cloud service so, badly.
I have basically found two methods to connect with your Linux in GUI mode. both methods have their own benefits and disadvantages. I will explain both methods very easily.
METHODS
- SSH
The first method is through SSH. you might have even heard about this. we can use the SSH protocol to get a GUI. but not a proper GUI. You won’t be able to see the Desktop and perform all tasks with a cursor. but you will be able to use some GUI applications. for example Mozilla, leafpad, gvim, Filezilla etc.
To use this function you will have to modify the ssh_conf file. so, to do that, go to the /etc/ssh/ssh_config
. and change Forwardx11 no
to yes
. and obviously uncomment it.
Screenshot:
and that’s it. now we will use this command to get a view of GUI applications:
ssh -X <username@IP/domain>
I am going to use AWS Linux to demonstrate this method.
Screenshot:
AWS provides ssh to login to ssh. that is why I have used -i
key to specify the key. and -X
enables X11 forwarding
When I connect to the host. it looks the same as usual.
Screenshot:
Now let’s run an application that runs with GUI. Type this command:
leafpad
and you can see the output yourself.
Screenshot:
You can even run the Mozilla Firefox browser. I could show you that but my PC specs are so low. It lags when I try to run heavy applications. But I m sure it won’t lag if you will use it on your local network.
2. XRDP
With this method, you can even see the whole desktop. It doesn’t require anyĀ SSH connection. It will run on default RDP port 3389. And it is the main reason for using AWS instead of the local system for demonstration.
you will have to install this tool. type this command:
apt install xrdp
Note- If you are running a Linux of some cloud service, you may need to install its desktop first. for example, if you are using Ubuntu with AWS then you will have to install ubuntu-desktop
. and if you are running Kali Linux then you have to install kali-desktop-xfce
.
One more thing, If you are using cloud service such as AWS, it is a must to add an inbound rule for port 3389. To do that in AWS go to
EC2> Security Group> Security Group ID> Edit Inbound Rules
Screenshot:
But there is no problem if you are using it on your local system.
Now, you need to start the xrdp service. type this command:
service xrdp start
After this, you can use Remmina to connect with it. I have already explained Remmina in my previous articles, Click here.
Thanks For visiting.