In that article I'll show you, how you can get a remote access to a Ubuntu computer. I mean remote desktop access, because I don't think you can have any questions with access to terminal, as I think ssh is well known to everyone.
I'll show how to get access with the hel p of VNC server and xrdp. Because if you want to make a connection from Windows computer, I think that VNC will work, to put it mildly, not so fast. Also youl need to install VNC client, if you will use simple VNC server, but there are situations when you cannot install additional software on computer, so we will configure everything so that you don't need to install anything. after the steps taken, you can 1) connect to your remote computer with clear VNC protocol; 2) connect to remote computer with RDP, and then from inside RDP session connect to desktop with VNC - that will allow you not to install additional client to computer from whitch you are connecting.
There is a single requirement to that scheme - you must have a real IP, or use VPN or SSH tunnel.
Lets begin with installation of VNC server to Ubuntu. I prefer x11vnc. To install it type the command in terminal:
sudo apt-get update sudo apt-get install x11vnc
Then set the password for authorization:
x11vnc –storepasswd
You'll be asked for password and a place to store the file with password.
Now lets make x11vns starts automattically.
1) If your system uses systemd (for example ubuntu 15.04 of later) you must create the config file:
sudo nano /lib/systemd/system/x11vnc.service
[Unit] Description=Start x11vnc at startup. After=multi-user.target [Service] Type=simple ExecStart=/usr/bin/x11vnc -auth guess -forever -loop -noxdamage -repeat -rfbauth /home/sanglyb/.vnc/passwd -rfbport 5906 -shared [Install] WantedBy=multi-user.target
Of cause for the place of /home/sanglyb there shoulb be you directory, or your path to the file with password, you set on previous step.
Then run commands:
sudo systemctl daemon-reload sudo systemctl enable x11vnc.service
2) If your system uses upstart (older Ubuntu versions before 15.04) you must create config file in /etc/init folder:
sudo nano /etc/init/x11vnc.conf
There should be that content:
start on login-session-start script /usr/bin/x11vnc -auth guess -forever -loop -noxdamage -repeat -rfbauth /home/sanglyb/.vnc/passwd -rfbport 5900 -shared end script
Like in systemd example change path to vnc password to yours.
After that you can start x11vnc service.
For systemd:
sudo service x11vnc start
For upstart:
sudo start x11vnc
Also you can reboot your computer and that service should start up with system.
Then you can try to connect to your conmputer with VNC. If connection was succesfull, and after system reboot VNC service will be started, you can go to next steps - installing xrdp server.
To install it type in terminal:
sudo apt-get install xrdp
After that edit config:
sudo nano /etc/xrdp/xrdp.ini
There remove all stings but globals and console (xrdp2) and change the name from xrdp2 to xrdp1. There should be 2 sections:
[globals] bitmap_cache=yes bitmap_compression=yes port=3389 crypt_level=low channel_code=1 max_bpp=24 #black=000000 #grey=d6d3ce #dark_grey=808080 #blue=08246b #dark_blue=08246b #white=ffffff #red=ff0000 #green=00ff00 #background=626c72 [xrdp1] name=console lib=libvnc.so ip=127.0.0.1 port=5906 username=na password=ask
Then type the command:
sudo /etc/init.d/xrdp restart
Finally you can try to connect. After RDP login there would be auth window where you must enter your VNC password.
Share the article with your friends in social networks, maybe it will be useful to them.
If the article helped you, you can >>thank the author<<