Skip to content

Instantly share code, notes, and snippets.

@kwhandy
Last active September 28, 2020 06:56
Show Gist options
  • Save kwhandy/e0b75600d84de1fe62a958d5638762a3 to your computer and use it in GitHub Desktop.
Save kwhandy/e0b75600d84de1fe62a958d5638762a3 to your computer and use it in GitHub Desktop.
How to EASILY FUCKIN CONNECT YOUR MACHINE to LIGHTSAIL INSTANCE(S)

Download Default Key

Setup your Machine(Mac/ Linux) for working with fuckin AWS Lightsail

Generate a RSA Key on Your Machine

Skip this if you have sensitive auth previously with your existing Key(id_rsa or id_ed..)

ssh-keygen -t rsa -b 4096 -N '' -C "<your fuckin email according AWS IAM>" -f ~/.ssh/id_rsa

Outline Manager for Windows

Just fuckin' download the default only. Don't generate new except you know what you do! Go here:

https://lightsail.aws.amazon.com/ls/webapp/account/keys

Make it accessible to read just for you

chmod 0400 ~/.ssh/LightsailDefaultKey-ap-southeast-1.pem

Force your machine to remember

cat ~/.ssh/id_rsa.pub | ssh -i ~/.ssh/LightsailDefaultKey-ap-southeast-1.pem ubuntu@<Your Lightsail Instance IP> 'cat >> .ssh/authorized_keys'

Fuckin' connect it!

ssh ubuntu@<Your Lightsail Instance IP>

Done!

It should done

Sauc3 for Y0u

  1. https://forums.aws.amazon.com/thread.jspa?threadID=266130
  2. https://garywoodfine.com/connect-aws-lightsail-ssh-with-ubuntu-terminal/
  3. or go with this keyword aws lightsail ssh permission denied (publickey)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment