Hey Digvijay, you can instead set up password based login for your instance.
Here's how you can do so:
- Create a user account.
For older versions:
sudo useradd -m amrutha
- Create a password for the user.
sudo passwd amrutha
You can give root permissions for the user.
In the above file add, amrutha ALL=(ALL)ALL
under the line, root ALL=(ALL)ALL
- You can enable password based authentication.
sudo vi /etc/ssh/sshd_config
Uncomment the line - PasswordAuthentication yes
- Finally, reload ssh configuartion.
sudo /etc/init.d/ssh reload
sudo /etc/init.d/sshd reload
Now you can logout and login back with your username and check that it worked.
Hope this helps! =)