当我尝试使用 Amazon Elastic Compute Cloud(Amazon EC2)实例连接到我的 AWS Cloud9 环境时,我收到连接错误。Amazon EC2 实例作为跳转主机运行 Amazon Linux 2。为什么我无法连接?
简短描述
AWS Cloud9 使用 netcat(nc)命令连接到跳转主机(也称为跳转服务器)。但是,默认情况下,在运行 Amazon Linux 2 且作为跳转主机的 Amazon EC2 实例上未安装 netcat。
要将您的 AWS Cloud9 环境连接到跳转服务器,您必须在您的 Amazon EC2 实例上手动安装 netcat 软件包。
解决方法
1. 使用 Linux 命令行界面(CLI),并通过运行以下 nc 命令,在您的 Amazon EC2 实例上安装 netcat 软件包:
yum install nc
2. 验证用户账户 ec2-user 是否具有指向命令 nc 的位置的 PATH。
相关信息
创建 SSH 环境
无法打开环境
Netcat 1.10(netcat 网站)