Permission denied

test@ip-172-xx-xx-xxx:~$ ssh-copy-id test@localhost

/usr/bin/ssh-copy-id: INFO: Source of key(s) to be installed: "/home/test/.ssh/id_rsa.pub"

The authenticity of host 'localhost (127.0.0.1)' can't be established.

ECDSA key fingerprint is SHA256:JQb2ysJuR.....

Are you sure you want to continue connecting (yes/no)? yes

/usr/bin/ssh-copy-id: INFO: attempting to log in with the new key(s), to filter out any that are already installed

/usr/bin/ssh-copy-id: INFO: 1 key(s) remain to be installed -- if you are prompted now it is to install the new keys

Permission denied (publickey).


attempting to ssh to localhost and local domain I get:

test@ip-172-xx-xx-xxx:~$ ssh test@localhost

Permission denied (publickey).

can someone help to find the reason I'm getting 'permission denied'?



  • post-author-pic
    David M
    09-30-2018

    Is this related to a lab that requires VNC instead of ssh?

  • post-author-pic
    David M
    09-30-2018

    Nm. I see localhost.

  • post-author-pic
    Vincent Z
    09-30-2018

    I' going through the module and part of the section is ssh to  localhost. I tried ssh test@localhost, public dns, private dns, ips-no cigar. 

    I searched the internet and I am going to try changing PasswordAuthentication to 'yes' in the sshd_config file. let you know if that works.

  • post-author-pic
    Vincent Z
    10-02-2018

    That didn't work. However, I noticed that the authorized_keys was not configured correctly. I can now log in using test@localhost. I can move on the module.

    Module has to be updated.

Looking For Team Training?

Learn More