Connect Linux machine from Windows desktop


xrdp is an Open Source Remote desktop Protocol server, which allows you to RDP to your Linux server from Windows machine.

Step 1: Install EPEL repository

For 32 bit OS

[root@server ~]# yum install http://download.fedoraproject.org/pub/epel/6/i386/epel-release-6-8.noarch.rpm

For 64 bit OS

[root@server ~]# yum install http://download.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm

Step 2: xrdp Installation

[root@server ~]# yum install xrdp

After installation, start the xrdp daemon

[root@server ~]# /etc/init.d/xrdp start
[root@server ~]# chkconfig --level 35 xrdp on

check xrdp is listening on 3389 port

[root@server ~]# netstat -antup | grep xrdp

Step 3: Connect from Windows machine

== Open run, type mstsc and hit enter

== RDC dialogue window will open, enter ip address of your linux machine in text box and click “Connect” button.

== Now you will be asked to enter your linux user name and password.

That’s it. You will see your linux graphical screen on your windows desktop.

Connecting Windows machine from CentOS


rdesktop (Remote Desktop) is the package used to connect the windows machine from linux server. Its used RDP ( Remote Desktop Protocol) with 3389 port.

Step 1: Install rdesktop

[root@server.local ~]#yum install rdesktop

Step 2: How to connect remote windows machine

[root@server.local ~]#rdesktop -u admin winhost1

[root@server.local ~]#rdesktop -u admin 192.168.1.10

After that enter the admin password to login into the windows machine.

Hope you are connected the windows host.

VNC server configuration


The common method to manage a Linux server remotely is through CLI interface via SSH, which many people often find it difficult as they are not familar with the Linux commands.

The solution is to install a KDE Or GNOME Desktop on the Linux server and access it through VNC.

VNC (Virtual Network Computing) is a graphical desktop sharing system which allows you to share a desktop of a remote server as if you are sitting in front of it.

Below are the two required packages needed for VNCserver

vnc-4.1.2-14.el5_6.6
vnc-server-4.1.2-14.el5_6.6

Following are the steps to install and configure VNC on a Linux server.

Step 1: Check whether the vnc-server packages are installed on machine.

[root@server.local ~]#rpm -qa vnc*

If not, please install the vnc packages,

[root@server.local ~]#yum install vnc*

Step 2: Set the vnc server password

[root@server.local ~]#vncpasswd
Password:
Verify:

Step 3: Start the VNC server

[root@server.local ~]# vncserver
xauth: creating new authority file /home/root/.Xauthority

New 'server.local.transmarkmail.com:1 (root)' desktop is server.local.transmarkmail.com:1

Creating default startup script /home/root/.vnc/xstartup
Starting applications specified in /home/root/.vnc/xstartup
Log file is /home/root/.vnc/server.local.transmarkmail.com:1.log

Step 4: Edit the configuration file

[root@server.local ~]# vi .vnc/xstartup

Uncomment the following two lines (remove the “#” characters):

unset SESSION_MANAGER
exec /etc/X11/xinit/xinitrc

Save that file and you’re ready to move on.

Step 5: Now, download and install VNC-Viewer on your computer (client-side).

Open vnc-viewer and enter “server.hostname:1? (server.local.transmarkmail.com:1) and the vnc password you have set above. You will now be connected to the graphical interface of your Linux server.

Step 6: To kill the vnc server session

[root@server.local ~]# vncserver -kill :1
Killing Xvnc process ID 1353