How to connect a private server(i.e. the server without a public IP address)?
Well there is a solution for the above concern, which leads us to learn a new concept named OpenVpn.
So, what is OpenVpn?
Well OpenVpn is a type of computer network that provides users with remote access to resources on the internet.
So how can we use it to connect a server?
Well the solution to the above query is given below.
STEP 3. Now we need to connect the second server i.e. with public IP to Xshell -> Then type yes and then enter multiple times.
Then openvpn will initialize
Then after some time again paste the same command (SSH client) and of root write openvpnas -> then again connect with the key pair.
Now already a openvpn (user) is created so now we have to change password.
So, type sudo passwd -> enter
STEP 4. Now open OpenVpn -> connect -> next (multiple times) -> agree ok -> Give url i.e. copy the IP of client link and paste -> next -> accept -> username : openvpn ->Password: give the password which u have set earlier in Xshell -> Accept -> Connect -> Password -> OK
So, this is the way by which we can connect servers without public IP address through openvpn.