Install SSH Server software (use sudo if not root):
apt-get install openssh-server
Create SSH key folder under the user’s home folder:
mkdir /home/username/.ssh
Set permissions on the folder:
chmod 700 /home/username/.ssh
Change directory to the folder:
cd /home/username/.ssh
Generate the SSH key pair:
ssh-keygen -t rsa
Launch SSH Session (password only mode):
ssh username@ip.or.internet.address
Since the public key is on the remote system, you could launch SSH session using the private key:
ssh -i ./id_rsa username@ip.or.internet.address