[英]Connect to amazon Lightsail instance via SSH using linux terminal
How can I connect to AWS LightSail instance?如何连接到 AWS LightSail 实例? AWS provides an web interface for doing this.
AWS 提供了一个 web 接口来执行此操作。 But how can I do this with my terminal with SSH.
但是我怎样才能用我的终端 SSH 做到这一点。
There are lots of documentations available for connecting from Windows with Putty.有很多文档可用于从 Windows 使用 Putty 进行连接。
Download the SSH Keys of the instance to which SSH connection to be made下载要建立 SSH 连接的实例的 SSH 密钥
A pem file with such naming is downloaded LightsailDefaultKey------1.pem下载具有此类命名的 pem 文件 LightsailDefaultKey------1.pem
ssh -i ~/.ssh/LightsailDefaultKey------1.pem user@<public-ip>
Note: By the type of instance you have, use the corresponding username注意:根据您拥有的实例类型,使用相应的用户名
Amazon Linux, FreeBSD, and openSUSE instances: ec2-user Amazon Linux、FreeBSD 和 openSUSE 实例:ec2-user
CentOS instances: centos CentOS 实例:centos
Debian instances: admin Debian 实例:管理员
Ubuntu instances: ubuntu Ubuntu 实例:ubuntu
Bitnami instances: bitnami比特纳米实例:比特纳米
Plesk instances: ubuntu Plesk 实例:ubuntu
use @kernelogy answer but make sure you set permission to your ssh key使用@kernelogy answer 但请确保您设置了对您的 ssh 密钥的权限
chmod 400 LightsailDefaultKey.pem
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.