I've created a new NodeJS instance on Amazon Lightsail, and wish to connect to it from my Mac's command line. Not sure how to include the required SSH key in the connection command when it says Permission denied (publickey)
.
LightsailDefaultPrivateKey-us-west-2.pem
chmod 600 [fileName]
at the command line to restrict file permission so only you can read itssh -i [fileName] [username]@[Public IP]
to establish the connection to Lightsail
To use your existing ~/.ssh/id_rsa.pub
nano ~/.ssh/authorized_keys
xclip -sel clip < ~/.ssh/id_rsa.pub
~/.ssh/authorized_keys
with the copied keyssh ubuntu@[instance_public_ip]
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With