Let us take the dummy IP for this task as 255.255.255.0 and the username on the remote system as user12
.
#command to connect to remote server
ssh user12@255.255.255.0
After this you will be prompted for connecting for the first time, write yes
.
Now you will be prompted to enter user12's password, type the password and press Enter
.
Write the following commands in the terminal to enable use of GUI.
DISPLAY=":0"
export DISPLAY
Now you are good to go and to use GUI