How To Remote Desktop from windows to Linux

本文介绍如何在CentOS7上安装桌面环境并配置XRDP服务,实现从Windows系统远程访问Linux图形界面。首先安装GNOME桌面环境,然后通过添加EPEL仓库安装XRDP。设置防火墙规则及SELinux配置确保远程桌面正常工作。
ACE-Step

ACE-Step

音乐合成
ACE-Step

ACE-Step是由中国团队阶跃星辰(StepFun)与ACE Studio联手打造的开源音乐生成模型。 它拥有3.5B参数量,支持快速高质量生成、强可控性和易于拓展的特点。 最厉害的是,它可以生成多种语言的歌曲,包括但不限于中文、英文、日文等19种语言

在windows 10 连接 CentOS 7上成功

安装桌面环境

在命令行下输入下面的命令来安装 Gnome 包

sudo  yum groupinstall "GNOME Desktop" "Graphical Administration Tools"

更新系统的运行级别(只是远程登陆,就不用了吧?)

如果你想在系统下次启动的时候自动进入图形界面,那么我们需要更改系统的运行级别,输入下面的命令来启用图形界面。

sudo ln -sf /lib/systemd/system/runlevel5.target /etc/systemd/system/default.target

重启系统

reboot

next

Here in this guide we are going to install Linux Remote Desktop Client (XRDP) which is an open source remote desktop protocol.

Linux remote desktop protocol XRDP allows you to access any Linux based machine right from your windows desktop using RDP Protocol, It will show your Linux Graphical User Interface on your windows machine.

New to Linux ? Start with Linux for Beginner’s Guide.
I will show you how to install & setup Linux Remote Desktop (XRDP) on CentOS7/RHEL 7. The installation process is quite simple; you just need to follow below steps.

Note: XRDP is not available on official repository of CentOS7/RHEL7.

We need to download and add EPEL (Extra Packages Enterprise Linux).

Install EPEL repository on CentOs/RHEL 7 directly from internet.

Both 32-bit and 64-bit packages are available.
For RHEL7 or CentOS7 7.x 32-bit

rpm -ivh http://download.fedoraproject.org/pub/epel/6/i386/epel-release-6-8.noarch.rpm

For RHEL7 or CentOS7 7.x 64-bit

rpm -ivh http://download.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm

After Installing EPEL Repository on your linux box, Now let’s move on the real action.

Step 2: Remote Desktop Linux Client (XRDP)

Run the below command in linux terminal window.

yum install xrdp tigervnc-server -y

Step 3: Start XRDP Service

systemctl start xrdp

Check port 3389 is in listening mode, to make sure XDRP service is up and running Use the following command.

netstat -antlup | grep xrdp

Step 4: Enable XRDP Service at Startup

systemctl enable xrdp

Step 5: Allow 3389 Port in the Linux Firewall

Add rule for remote desktop port 3389 in Linux Firewall.

firewall-cmd --permanent --zone=public --add-port=3389/tcp
firewall-cmd --reload

Step 6: Configure SELinux to allow XRDP

chcon --type=bin_t /usr/sbin/xrdp
chcon --type=bin_t /usr/sbin/xrdp-sesman

Step 7: Test Remote Desktop Connection from Windows to Your Linux Machine.

Now back on your windows and open Remote Desktop Connection Window by typing mstsc in Run command box.

First type the IP Address of Linux Machine and then click Connect Next you need to Provide username and password of your Linux machine and hit ok.(you can use root or any other user credentials).

After some startup settings, you will get a desktop of your Linux machine on your windows PC

That’s all, we have successfully setup remote desktop feature on CentOS7.

连接成功的桌面:

这里写图片描述

error

更新“yum update”的时候出现以下错误“vnc error only supporting 8 15 16 24 bpp rdp connections”

解决办法:https://it.megocollector.com/linux/rdp-into-centos-7-with-xrdp/

FROM:


http://broexperts.com/how-to-remote-desktop-from-windows-to-linux-centos7/


OTHER:

http://www.techotopia.com/index.php/Remote_Access_to_the_CentOS_Desktop

您可能感兴趣的与本文相关的镜像

ACE-Step

ACE-Step

音乐合成
ACE-Step

ACE-Step是由中国团队阶跃星辰(StepFun)与ACE Studio联手打造的开源音乐生成模型。 它拥有3.5B参数量,支持快速高质量生成、强可控性和易于拓展的特点。 最厉害的是,它可以生成多种语言的歌曲,包括但不限于中文、英文、日文等19种语言

### Steps to Create a Virtual Machine (VM) in AWS and Set Up Security Firewall #### Step 1: Sign In to AWS Management Console 1. Open your web browser and go to [AWS Management Console](https://aws.amazon.com/console/). 2. Sign in using your AWS account credentials. #### Step 2: Launch an EC2 Instance 1. In the AWS Management Console, search for and select **EC2** from the services list. 2. Click on the **Launch Instance** button. 3. Choose an Amazon Machine Image (AMI), such as Amazon Linux 2 or Ubuntu Server. 4. Select an instance type (e.g., t2.micro for free tier eligible). 5. Configure instance details, including the number of instances, network, and subnet. 6. Add storage if needed, specifying the size and type of storage. 7. Tag the instance with meaningful key-value pairs for easier identification. 8. Configure the security group (firewall rules): - Click on **Configure Security Group**. - Choose to create a new security group or select an existing one. - Define inbound and outbound rules: - Inbound rules control traffic coming into the instance. - Outbound rules control traffic leaving the instance. 9. Review the instance configuration and click **Launch**. 10. Select an existing key pair or create a new one, then acknowledge the key pair warning and click **Launch Instances**. #### Step 3: Set Up Security Firewall (Security Group) 1. After launching the instance, navigate back to the **EC2 Dashboard**. 2. In the left-hand menu, under **Network & Security**, click on **Security Groups**. 3. Find the security group associated with your newly created instance. 4. Edit inbound rules: - Click on the **Inbound Rules** tab. - Click **Edit inbound rules**. - Add rules to allow traffic from specific IP addresses or ranges. Common rules include: - **SSH (port 22)** for remote access. - **HTTP (port 80)** and **HTTPS (port 443)** for web traffic. - **Custom TCP Rule** for database connections or other services. - Specify the source as `Anywhere` (`0.0.0.0/0`) for public access (use cautiously) or a specific IP range for restricted access. 5. Edit outbound rules (usually set to allow all outbound traffic by default): - Click on the **Outbound Rules** tab. - Click **Edit outbound rules**. - Adjust rules as necessary, but allowing all outbound traffic is generally safe. #### Step 4: Connect to Your Instance 1. Once the instance is running, connect to it using SSH (for Linux instances) or RDP (for Windows instances). 2. For Linux instances: - Use the `.pem` key file downloaded earlier. - Open a terminal and run the following command: ```bash ssh -i "your-key-pair.pem" ec2-user@your-instance-public-dns-name ``` 3. For Windows instances: - Use Remote Desktop Connection and the password retrieved from the AWS console. --- ### Key Concepts - **Security Groups**: Act as virtual firewalls for EC2 instances, controlling inbound and outbound traffic. - **Instance Types**: Determine the hardware specifications of the VM. - **Key Pairs**: Used for secure SSH access to Linux instances. By following these steps, you can create a secure and functional VM in AWS, ensuring that only authorized traffic reaches your instance.
评论 3
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值