Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am trying to connect to a VM using this command:

sudo ssh -i /home/ritesh/.ssh/id_rsa1 tc@ -L 5901:localhost:5901

But it's giving me this error:

The authenticity of host ' (' can't be established.
RSA key fingerprint is X.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added 'XX.XX.XX.XX' (RSA) to the list of known hosts.
Permission denied (publickey,gssapi-with-mic).

How do I resolve this error?

share|improve this question

you need to copy your public key to VM, it's not recognized your public key so add it

$ scp ~/.ssh/ tc@

or also try it

$ cat ~/.ssh/ | ssh tc@[] "cat >> ~/.ssh/authorized_keys"
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.