I am able to login through virtual machine in HDP but I am unable to login through the terminal.
Here is the error I am getting.
View solution in original post
mv ~/.ssh/known_hosts file to /tmp and try again, it should work.
Another option is
Edit ~/.ssh/known_hosts file and remove line number 4. Save and try again