Free VPS Server 24×7 Lifetime
Hello, in this tutorial, you will learn about a new platform that gives lifetime free tier to get 2 VPS. I setup Ubuntu VPS with RDP access. You can enjoy 1GB memory, 50GB storage and 1/8 OCPU each of the VM instance. Let’s go to the video. ...
Sign up to Oracle
In the Oracle home page, click “start your trial today” button. You will redirect to a new page an introduction page that shows what you can do use this lifetime free tier. These are the features, you able to use 2 Virtual machine 1/8 OCPU, 1GB Memory and 50GB storage. This is the best always free tier among all free tiers.
For sign up, click “start for free” button at the top of the page. You have to fill this form using your own details.
Enter your country, first name, last name and your email address. After filling all the details, click “verify my email” button.
It sends a verification link to your email address. Signing to your email account and verify it. Ok, now you will redirect to full application for. complete the all-necessary fields here.
Enter strong password, account name and select a home region. Company name is not necessary, you can skip that field. After complete the fields, click “continue” button, it will redirect you to new form.
Enter your address and press “continue”. Next, the mobile verification, enter your real mobile number. they will send a code as a message. After receiving it, enter here and press “verify my code”.
This is the last verification level; you have to enter your card details here. Don’t worry they do not charge any fees until you manually update the account. You can use credit cards, international debit cards and virtual credit cards for this verification.
I am not showing the further steps due to security reason. After sign up complete, you can go to the next step.
Setting up VPS
After completing signup, login to Oracle cloud using your credentials. You will be redirected to dashboard. Click “create a VM instance” tab to setup your first VPS on Oracle Cloud.
First, name your VM instance, you can use any name here. You have to change the OS, click “edit” link under configure and placement hardware. Click “change image” button and select Ubuntu 18.04 as your OS. After that, add a SSH key to connect to the VPS. Tik mark “paste public key”. Then, you have to generate a SSH key using Putty Key Generator. Check the description, I will provide the link for this software. After opening the app, click generate button and move your cursor in this area. Copy your public key and paste it in to the field. After that, click “create” button and leave other settings as default. You have to save your public key in safe place without it you unable to connect to the VPS.
You can see virtual machine is staring. It takes some times, please wait for few moments. While VPS is deploying, we add a firewall rule to allow all ports and IP Ranges. Click the link Infront of the “Virtual Cloud Network”. Then click “security list” at the left menu bar. After that, click on your subnet ID. It will bring you to firewall rule section. To add a new rule, click “add ingress rules” button. Enter this IP range to allow all the ranges and select “all protocols” to open all the ports as well. Now save the rule and go back to your VM instance using menu navigation bar.
Setup Desktop Environment and Stabilized RDP Connection
Now, open Putty app to connect VPS. Enter your Public IP address as host name. Expand “SSH” tab and click on “Auth”. In here, add your Private key which was saved before. If you want you can save the session, it is helpful to login again without entering credentials. After that, click “open” button, the terminal will open. Enter “ubuntu” as login name.
Get root access first.
Now add new user using this command. Don’t forget to replace the user name. Enter a password and verify it. You do not see this due to security reason. Don’t get confuse just type. You can skip these fields by pressing enter. They ask this information is correct, type “Y” and enter.
To give administrative access to new user use this command. Replace the username here also.
usermod -aG sudo username
You can see UFW apps list by typing this command. Make sure “Open SSH” is there.
ufw app list
We need to make sure that the firewall allows SSH connections. We can allow these connections by typing this command.
ufw allow OpenSSH
Afterwards, we can enable the firewall by typing this. Type “y” and press “ENTER” to proceed.
You can see that SSH connections are still allowed by typing this.
You can access to your new user account by opening up a new terminal session. Type this command, don’t forget to replace username and IP address. Type “yes” to proceed. You can see here permission denied message. This happens due to we do not enable the password authentication login for SSH.
To Edit the server’s SSH settings, enter this command. This is not visible due to fast action of it. You can check the guide for it.
In here, find “password authentication” line and change it in to “yes”. Now save the changes by pressing control + X then type “Y” after press “enter”.
sudo nano /etc/ssh/sshd_config
Restart SSH using this code so it will reload the SSH configuration you just edited.
sudo service ssh restart
Now try the previous command again. It works now, enter your password to proceed.
Ok now, we access as a new user that we added. On your server, update your list of packages using this line.
sudo apt update
Now install the Xfce desktop environment on your server by typing this. Type “Y” to proceed.
sudo apt install xfce4 xfce4-goodies
This takes some times to install.
Once that installation completes, install the Tight VNC server by using this command.
sudo apt install tightvncserver
Use this command to set up a secure password and create the initial configuration files. Once you verify the password, you’ll have the option to create a view-only password. Type “N” and press enter.
After that, we have to configure VNC server. first stop the VNC server instance that is running with following command.
vncserver -kill :1
Before you modify the xstartup file, back up the original.
mv ~/.vnc/xstartup ~/.vnc/xstartup.bak
Now create a new xstartup file and open it in your text editor. This command also not visible.
sudo nano ~/.vnc/xstartup
Add these commands to the file and save it. By pressing, control + X then type “Y” after press “enter”.
we’ll need to make it executable by using this command.
sudo chmod +x ~/.vnc/xstartup
Now, restart the VNC server by typing this.
Create a new unit file using this command.
Next, we’ll set up the VNC server as a system service so we can start, stop, and restart it as needed, like any other service. First, you should edit this command. Be sure to change the value of User, Group, Working Directory, and the username in the value of PID FILE to match your username.
Description=Start TightVNC server at startup
ExecStartPre=-/usr/bin/vncserver -kill :%i > /dev/null 2>&1
ExecStart=/usr/bin/vncserver -depth 24 -geometry 1024x768 :%i
ExecStop=/usr/bin/vncserver -kill :%i
Paste your code to the editor and save the changes as before.
Next, make the system aware of the new unit file by typing this.
sudo systemctl daemon-reload
Enable the unit file by using this command.
Stop the current instance of the VNC server if it’s still running.
vncserver -kill :1
Then start it as you would start any other system service.
You can verify that it started with this command. You can see here, VNC server is active now. Now hard part is finished.
Setup Local Port Forwarding and Connect RDP
Open Putty app and enter Public IP address as host name. Save your configurations using saved sessions. Add your authentication files using “Auth” tab. Click “Tunnel” tab to local port forwarding. Enter source port 5900 and type destination as local host 5901. Then click add button and open terminal window. Login using ubuntu user name. This allows you to connect VNC server. Minimalize the terminal tab but don’t close it. Open turbo VNC viewer and enter local host 5900 as VNC server. Click connect button to get RDP access and enter your VNC server password. You can see here; we successfully access to RDP.