Currently I have a computer that has set up SSH properly in its EC2 instane, but I have another laptop I'm trying to connect with. When I went to the ASWS console and downloaded another key pair and used it in the SSH in the SSH, I found this error: Permission denied (Publisher).
I already command Thanks a lot! This order I am doing to SSH for my ec2 example: I am not completely clear on the scenario, but I think that you are saying that you Have done something in this sequence: < If you are describing this, the problem is that the Key key # 2's public key has never been installed on EC2 example, you need a private key on your client. , And matches the server you are connecting to. Once the example is already present, creating a new value in AWS will not update the key on the existing example. You have to log in it (with key # 1), and the new public key will be placed in the right place. I did not do this in a while, but according to it, you edit chmod 400 /path/sshkey.pem but I still get a public key error Does anyone know why this is?
ssh -i /path/sshkey.pem ec2-user@ip.compute.amazonaws.com
~ ec2-user / .ssh / authorized_keys (a text file) at the end of the file and your Attach a public key to the key pair (which is also in text format). You may have to restart the
sshd daemon, which should do the command
sudo / sbin / service sshd restart but try entering the first new key; If you make a mistake in editing the file, you can lock yourself (to accidentally create a new account to avoid locking the EC 2-user account and its
.ssh / authorized_keys is more secure in updating.)
No comments:
Post a Comment