仅在 AWS 中部署具有元数据 v2 (IMDSV2) 的 Avamar 时,无法连接到 AVE
Summary: 当仅使用 IMDSV2 选项(而不是 IMDSV1)部署 Avamar 时,通过 SSH 连接到 Avamar Server 会失败。
This article applies to
This article does not apply to
This article is not tied to any specific product.
Not all product versions are identified in this article.
Symptoms
Avamar 部署成功完成,但 SSH 连接报告以下内容:“无可用的受支持身份验证方法(服务器已发送:公钥)。服务器拒绝了我们的密钥”。
Cause
IMDSv2 使用面向会话的请求。对于 Avamar,这不能“开箱即用”。
Resolution
1.使用 已启用的元数据 v1 和 v2 部署 Avamar 实例。
2.启动 AWS CLI 并运行以下命令,用新部署的 Avamar Server 的实例 ID 替换实例 ID 。
3.运行以下命令以启用 HttpTokens 并将实例转换为 IMDSv2。同样,将 instance-id 替换为 Avamar Server 的实际实例 ID。
可以根据特定需求调整以下参数:
http-put-reponse-hop-limit:“实例元数据请求所需的 HTTP PUT 响应跳限制。”
4.通过重复步骤 2 中的 命令,验证参数是否已接受。输出示例:
5.测试 SSH 连接并验证是否已启用 IMDSv2。运行以下 curl 命令以确认:
2.启动 AWS CLI 并运行以下命令,用新部署的 Avamar Server 的实例 ID 替换实例 ID 。
aws ec2 describe-instances --instance-ids
实例定义应包含设置为“可选”的“HttpTokens”设置。示例:
3.运行以下命令以启用 HttpTokens 并将实例转换为 IMDSv2。同样,将 instance-id 替换为 Avamar Server 的实际实例 ID。
aws ec2 modify-instance-metadata-options --instance-id --http-tokens required --http-endpoint enabled --http-put-response-hop-limit 1
http-put-reponse-hop-limit:“实例元数据请求所需的 HTTP PUT 响应跳限制。”
4.通过重复步骤 2 中的 命令,验证参数是否已接受。输出示例:
5.测试 SSH 连接并验证是否已启用 IMDSv2。运行以下 curl 命令以确认:
记下“未经授权”图块和标头。它们表示已启用 IMDSv2,并且需要令牌。如果实例元数据服务在版本 1 中,则不会出现任何未经授权的错误。输出示例:
参考资料:
https://aws.amazon.com/cli/ https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/configuring-instance-metadata-service.html
参考资料:
https://aws.amazon.com/cli/ https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/configuring-instance-metadata-service.html
Affected Products
Avamar Server, Avamar Virtual EditionArticle Properties
Article Number: 000206930
Article Type: Solution
Last Modified: 01 Aug 2025
Version: 3
Find answers to your questions from other Dell users
Support Services
Check if your device is covered by Support Services.