Creating SSH users in an AWS install with Ubuntu

Discussion in 'General' started by koltz, Apr 20, 2020.

  1. koltz

    koltz Member

    I am looking at migrating to AWS using their Ubuntu installation and it works great so far. Trying to add additional SSH users using certificates instead of a password. Anybody have instructions on how to do this? Using The Perfect Server w/ Ubuntu 18.04 LTS but will migrate to 20.04 when those instructions are posted.

    Thank you!
     
  2. nhybgtvfr

    nhybgtvfr Well-Known Member HowtoForge Supporter

    it's exactly the same as creating key-based ssh users in ispconfig on any other server there is nothing aws related required.

    unless you mean for going through the tutorial over ssh..
    well, you can't just ssh as root, you ssh as ubuntu and then sudo su to root.

    you can either create more users like the default ubuntu user, and add them to sudoers, exactly the same way as you would on any other ubuntu server.
    then assuming the user already has the key-pair, just paste/append the public key into /home/<username>/.ssh/authorized_keys
    or add it as another key in /home/ubuntu/.ssh/authorized_keys and multiple users can ssh in as ubuntu using their own keys, and sudo to root.
    direct ssh access as root is not allowed by default, and I don't recommend allowing it, but you can, just do the same thing in /root/.ssh/authorized_keys
     
    Last edited: Apr 20, 2020
  3. koltz

    koltz Member

    Thanks for the reply. I was assuming it was the same but I couldn't find very good instructions online how to do that.
     

Share This Page