Centos/RHEL open x11vnc service

This article I will show you, tools which enabled you to access remote Desktop on machines running Centos/RHEL.

Before beginning, you only need SSH access to your server and rights to install software. You need to know root password or permissions to use sudo. All commands will work on every CentOS server 5/6/7. Before start, you need to install desktop environment to your server.

#yum groupinstall 'GNOME Desktop Environment' 'X Window System'

x11vnc – simples of this 3 methods to get remote access. VNC stands for Virtual Network Computing) is a very useful network graphics protocol

Perhaps you need to enable EPEL (Extra Packages for Enterprise Linux) repository. Run

#yum -y install epel-release

Now we can install x11vnc. This command will install server and solve all dependencies

#yum -y install x11vnc

Then we will protect server with password:

# x11vnc -storepasswd /etc/x11vnc.pass

Config DM script ,for example gdm:

#vi /etc/gdm/Init/Default
/usr/bin/x11vnc -nap -bg -many -repeat -clear_keys -rfbauth /etc/x11vnc.pass -rfbport 5900

Add / edit KillInitClients option in the [daemon] section to:add new line before exit(0):

#vi /etc/gdm/custom.conf
KillInitClients=false

whichever returns a value is the one you a running.  

CentOS7's default firewall is not iptables, but firewalle. You need to install iptable-service.

//First check to see if iptables is installed
#service iptables status

//Install iptables
#yum install -y iptables

//Update iptables
#yum update iptables 

//Install iptables-services
#yum install iptables-services

Disable/stop the firewalld service that comes with firewalld

#systemctl stop firewalld

#systemctl mask firewalld

Now, config iptables:

#iptables -A INPUT -p tcp -m state --state NEW -m tcp --dport 5900 -j ACCEPT 
#service iptables save
#service iptables restart

 

Reboot the machine, all complete, enjoy!

More detail,please click here:5 Tools to Enable Remote Desktop Access on RHEL/CentOS 7

reference link:

https://www.robhq.com/2017/09/x11vnc-with-redhat-centos-7/

https://linoxide.com/linux-how-to/install-configure-vnc-server-centos-7-0

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值