Page 1 of 2

Remote access to Centos 7

Posted: 2018/08/10 13:27:11
by Modulopi
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

Re: Remote access to Centos 7

Posted: 2018/08/11 13:34:14
by jlehtone
Do you have EPEL repo configured? I think it has x2go* packages.

Re: Remote access to Centos 7

Posted: 2018/08/13 04:01:36
by hunter86_bg
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.

Re: Remote access to Centos 7

Posted: 2018/08/13 07:39:22
by Modulopi
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.

Re: Remote access to Centos 7

Posted: 2018/08/13 16:10:23
by hunter86_bg
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

Re: Remote access to Centos 7

Posted: 2018/08/14 07:54:16
by Modulopi
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.

Re: Remote access to Centos 7

Posted: 2018/08/17 04:01:47
by hunter86_bg
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.

Re: Remote access to Centos 7

Posted: 2018/08/17 08:35:44
by Modulopi
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.

Re: Remote access to Centos 7

Posted: 2018/08/17 08:53:16
by TrevorH
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.

Re: Remote access to Centos 7

Posted: 2018/08/18 09:53:34
by hunter86_bg
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.