Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

SSH connection in Amazon lightsail

I want to make an SSH connection from my own terminal, not from the browser-based command line interface Amazon provides. How do I know what username and host to use in my SSH command? So far, I'm unable to connect via SSH. I believe I am using the key correctly, but I am getting "permission denied (publickey)".

I have set 400 permissions for the private key file.

Can I use the public IP for the host? Is the username "ubuntu"? Something else?

like image 558
arnoldbird Avatar asked Dec 13 '16 18:12

arnoldbird


1 Answers

Right now you can run only two base OS in LightSail:

  • Amazon Linux 2016.09.0

    Default user: ec2-user

  • Ubuntu 16.04 LTS

    Default user: ubuntu

The host name is the public IP, according to step #4 of the documentation at https://lightsail.aws.amazon.com/ls/docs/how-to/article/lightsail-how-to-set-up-putty-to-connect-using-ssh

like image 135
Sergey Kovalev Avatar answered Sep 28 '22 04:09

Sergey Kovalev