1
resposta

Não consigo usar minha chave privada na instancia ubuntu da aws

Bom dia,

Estou fazendo o curso lightsail e na parte onde vou usar minha chave criada pela aws segundo instruções da aula, dá o erro abaixo:

ED25519 key fingerprint is SHA256:XRJAz33lbSsp3A0zLaBGnT8YcPd2OByWFeXJCe0Hcqs. This key is not known by any other names. Are you sure you want to continue connecting (yes/no/[fingerprint])? yes Warning: Permanently added '3.222.116.179' (ED25519) to the list of known hosts. @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @ WARNING: UNPROTECTED PRIVATE KEY FILE! @ @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ Permissions 0555 for 'lightsail-gsilva.pem' are too open. It is required that your private key files are NOT accessible by others. This private key will be ignored. Load key "lightsail-gsilva.pem": bad permissions

Lembrando que como instruído executei o comando chmod 400 na chave. Estou usando o ubuntu para windows.

Obrigado.

1 resposta

Guilherme, bom dia.

Acho que pode ter dado algum problema no seu chmod. O log de erro diz que as permissões ainda não são 400.

Para verificar que o chmod funcionou, tente fazer ls -l. Caso não tenha mudado, você verá algo assim:

-rw-rw-r--  1 familia familia 3.4K Jun  1 18:31 .gitignore

Caso funcione tente fazer, novamente.

O correto seria ver algo assim:

-r--------  1 familia familia 1.7K Jun  1 18:12 planetae-main.pem

Com acesso somente para leitura (r)