[LINUX] [Note] ssh connection from terminal with AWS LightSail

Introduction

A memorandum of practice for building a data science environment with AWS LightSail

table of contents

  1. Create an instance with LightSail
  2. shh connection

1. Create an instance with AWS lightsail

https://lightsail.aws.amazon.com image.png

2. ssh connection

Download your private key from your account page image.png Account page image.png

Store the private key and configuration file in the "~ / .shh" directory

cd ~/.ssh
ls
Lightsail_ubuntu_20201123.pem	config
#Lightsail_ubuntu_20201123.pem ・ ・ ・ Private key
#config ・ ・ ・ configuration file

~/.ssh/config


host lightsail_ubuntu
	HostName 3.112.200.82
	Port 22
	User ubuntu
	IdentityFile ~/.ssh/Lightsail_ubuntu_20201123.pem

ssh connection

ssh lightsail_ubuntu

Alternatively, you can add the private key option without setting the config file.

ssh -i Lightsail_ubuntu_20201123.pem [email protected]

This completes the connection!

reference

-Ssh connect to Amazon Lightsail server https://nana4-story.com/ssh-amazon-lightsail

Recommended Posts

[Note] ssh connection from terminal with AWS LightSail
Connect to centos6 on virtualbox with ssh connection from Mac
[Note] Get data from PostgreSQL with Python
Until SSH connection with Fabric (MacOS-> CentOS7)
AWS EC2 instance launch and ssh connection
SSH connection from Windows via SSL VPN
Introducing Paramiko + scp ~ SSH connection ~ File transfer with SCP
Pipenv install with ssh from Private Bitbucket Repository
AWS EC2 2nd SSH connection to EC2 Instance (Amazon Linux2)