

翻訳は機械翻訳により提供されています。提供された翻訳内容と英語版の間で齟齬、不一致または矛盾がある場合、英語版が優先します。

# `AWS-DisableIncomingSSHOnPort22`
<a name="disable-incoming-ssh"></a>

**説明**

`AWS-DisableIncomingSSHOnPort22` ランブックは、セキュリティグループの TCP ポート 22 で無制限の受信 SSH トラフィックを許可するルールを削除します。

[このオートメーションを実行する (コンソール)](https://console.aws.amazon.com/systems-manager/automation/execute/AWS-DisableIncomingSSHOnPort22)

**ドキュメントタイプ**

オートメーション

**[所有者]**

Amazon

**[Platforms]** (プラットフォーム)

Linux、macOS、Windows

**パラメータ**
+ AutomationAssumeRole

  タイプ: 文字列

  説明: (オプション) Systems Manager Automation がユーザーに代わってアクションを実行できるようにする AWS Identity and Access Management (IAM) ロールの Amazon リソースネーム (ARN)。ロールを指定しない場合、Systems Manager Automation はこのランブックを開始するユーザーのアクセス許可を使用します。
+ SecurityGroupIds

  タイプ: 文字列

  説明: (必須) SSH トラフィックを制限するセキュリティグループの IDs のカンマ区切りリスト。

**必要な IAM アクセス許可**

`AutomationAssumeRole` パラメータでは、ランブックを正常に使用するために、次のアクションが必要です。
+ `ec2:DescribeSecurityGroups`
+ `ec2:RevokeSecurityGroupIngress`

**ドキュメントステップ**
+ `aws:executeAwsApi` - TCP ポート 22 で受信 SSH トラフィックを許可するすべてのルールを、 `SecurityGroupIds`パラメータで指定したセキュリティグループから削除します。

**[出力] **

DisableIncomingSSHTemplate.RestrictedSecurityGroupIds - インバウンド SSH ルールが削除されたセキュリティグループの IDs のリスト。