Remote access to Centos 7

Issues related to configuring your network
Modulopi
Posts: 5
Joined: 2018/08/10 13:19:36

Remote access to Centos 7

Post by Modulopi » 2018/08/10 13:27:11

Hello,

I want to remotely have access from my Laptop (windows 10) to my desktop (CentOS 7).
I have tried VNC and even a protocol that give me access to my desktop thought "Remote Desktop Connection" from windows.

But I do want to have the same desktop in my laptop that it is in my desktop. The 2 previous method gave me access to my desktop, but I cannot have access to the open programs.
For example, I do want to be able if something is running (started from my desktop) , and modify it from my laptop.
When my desktop was running on windows, I could easily do it with the Remote Desktop Connection, but now I am stuck because I cannot do it.

I was looking on the web but got no luck, if someone could help me that would be great.

If it is not possible, that will be good to be able to remotely control a program running on Centos (knowing his PID).

Thanks for you help.

Regards

User avatar
jlehtone
Posts: 4523
Joined: 2007/12/11 08:17:33
Location: Finland

Re: Remote access to Centos 7

Post by jlehtone » 2018/08/11 13:34:14

Do you have EPEL repo configured? I think it has x2go* packages.

hunter86_bg
Posts: 2019
Joined: 2015/02/17 15:14:33
Location: Bulgaria
Contact:

Re: Remote access to Centos 7

Post by hunter86_bg » 2018/08/13 04:01:36

A more simple approach is to use always the vnc.
For example you login on your desktop and then open a VNC session to localhost.

Modulopi
Posts: 5
Joined: 2018/08/10 13:19:36

Re: Remote access to Centos 7

Post by Modulopi » 2018/08/13 07:39:22

Hi,
thank you for your answer.
I will have a look to the x2go package, then if it doesn't work like I wanted, how can I open a vnc session to localhost(on my desktop), and do you have a robust VNC viewer software for windows 10 ?

I am also kind of surprise that there is no native package on centos to do this kind of stuff.

Thanks.

hunter86_bg
Posts: 2019
Joined: 2015/02/17 15:14:33
Location: Bulgaria
Contact:

Re: Remote access to Centos 7

Post by hunter86_bg » 2018/08/13 16:10:23

On CentOS 7 you can:

Code: Select all

yum install tigervnc
On windows 10 you can find tigervnc on : https://github.com/TigerVNC/tigervnc/releases -> Binaries are available from bintray -> tigervnc64-1.9.0.exe

Modulopi
Posts: 5
Joined: 2018/08/10 13:19:36

Re: Remote access to Centos 7

Post by Modulopi » 2018/08/14 07:54:16

Thanks, I already have installed tigervnc on the centos desktop.
But how I create a vnc session on the desktop ? Then when I connect with VNC on the laptop I will find all the apps and program opened when I left my desktop ?

Thanks a lot.

hunter86_bg
Posts: 2019
Joined: 2015/02/17 15:14:33
Location: Bulgaria
Contact:

Re: Remote access to Centos 7

Post by hunter86_bg » 2018/08/17 04:01:47

You can find how to deploy your VNC server here .
Actually you will:
1.Setup systemd service
2. Set a password
3.Set the firewall if you don't want to use ssh for the connection.

In my case I'm using vncserver-myuser@:99.service because I want it to listen on port 5999 as I have a random number of VMs.Also, you can configure your vnc to listen on localhost and do not open the VNC port, and use ssh port forwarding (valid for putty also) in order to secure your VNC a little bit.
Once you configure your VNC , you can open the tigervnc client (which you have installed) and set the destination like this:
'localhost:5901'
Note:you will use 5901 if your service is '@:1' and so on.
Once you open your apps in the vnc session, you can open another session from your workstation and complete your task.
I have never tested if person1 can present this way and person2 to view it live, but most probably will work.

Modulopi
Posts: 5
Joined: 2018/08/10 13:19:36

Re: Remote access to Centos 7

Post by Modulopi » 2018/08/17 08:35:44

Thanks for the details.
Actually I am able to create the VNC server on the desktop.
But once I use a VNC client on windows 10, and try to connect using IP_address:5901, I can login to the desktop but with a new environment (I can not have access to opened apps), do you think it is possible to remotely control the session opened in the desktop ?

Thanks a lot.

User avatar
TrevorH
Site Admin
Posts: 33191
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: Remote access to Centos 7

Post by TrevorH » 2018/08/17 08:53:16

If you use vnc then what you get is a self-contained desktop that has no relationship to what's on the local console. If you need to access the actual desktop on the physical machine then I think you need to use xrdp or perhaps the x2go mentioned earlier can do that.
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke

hunter86_bg
Posts: 2019
Joined: 2015/02/17 15:14:33
Location: Bulgaria
Contact:

Re: Remote access to Centos 7

Post by hunter86_bg » 2018/08/18 09:53:34

I've used to open tigervnc towards localhost:59XY (from the CentOS 7 Desktop) and can see what I have opened from my Windows Jumpstation. VNC is way more reliable and stable.
I'm not sure how many people use xrdp or x2go and having in mind that VNC server deployment is well documented - it is a more suitable way.

Post Reply