Skip to content

Add SSH Access to Cloud Server

In order to ssh into either of the AWS EC2 servers, you need to use ssh with keys. No passwords are used so you need to add the key to the server for the new user. First, the user needs to generate an ssh key using a key type of ed25519. This can be done from the command line using:

    ssh-keygen -t ed25519

It will prompt you where you want the file to be saved and if you don't have a key with the default name, you can accept the default. It will overwrite an existing key so make sure you don't have a key with the name you provide. When it prompts you for a password, you can leave it blank so you don't have to type in a password when you ssh into the server. Once the file is generated, there will be a public part of the key with the file extension .pub. You need to provide the text of that pub file to an admin who will add the key to the ~/.ssh/authorized_keys file in the admin account on the server you are trying to ssh into. Once that is done, you can ssh using ssh admin@ec2-ip-address (you might have to identify the ssh key name on the command line if it isn't the default).