SSH is widely used to login into headless servers or remote machines, You can login to the remote machine if you know its IP address and a valid username.
We can get started by installing SSH server in your machine.
if you running Deb based Linux distribution, you can install using,
sudo apt install openssh-server
We have setup ssh access in the machine to which you want to login remotely.
Now from your laptop or desktop execute the command.
You will be now prompted for password. Once you enter the password you will be given access to the machine.
now you have logged into the remote machine successfully.