

本文属于机器翻译版本。若本译文内容与英语原文存在差异，则一律以英文原文为准。

# `pcluster ssh`
<a name="pcluster.ssh-v3"></a>

运行预填充了集群用户名和 IP 地址的 `ssh` 命令。将任意参数附加到 `ssh` 命令行的结尾。

```
pcluster ssh [-h]
                 --cluster-name CLUSTER_NAME
                [--debug]
                [--dryrun DRYRUN]
                [--region REGION]
```

## 命名的参数
<a name="pcluster-v3.ssh.namedargs"></a>

**-h, --help**  
显示 `pcluster ssh` 的帮助文本。

**--cluster-name, -n *CLUSTER\$1NAME***  
指定要连接到的集群的名称。

**--debug**  
启用调试日志记录。

**--dryrun *DRYRUN***  
当为 `true` 时，打印将要运行的命令行并退出。（默认值为 `false`。）

**--region, -r *REGION***  
指定 Amazon Web Services 区域 要使用的。 Amazon Web Services 区域 必须使用`AWS_DEFAULT_REGION`环境变量、`~/.aws/config`文件`[default]`部分中的`region`设置或`--region`参数来指定。

示例：

```
$ pcluster ssh --cluster-name mycluster -i ~/.ssh/id_rsa
```

运行预填充了集群用户名和 IP 地址的 `ssh` 命令：

```
ssh ec2-user@1.1.1.1 -i ~/.ssh/id_rsa
```