你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn

如何通过 Bastion 连接到 CycleCloud 门户

当 HTTPS 路由在本地环境中不可用时,可以部署 Azure Bastion 来建立到 Azure CycleCloud 虚拟机的 SSH 隧道。 有关具体操作指南,请参阅连接到 VM 的隧道命令

步骤 1 - 检索 CycleCloud VM 的资源 ID

若要检索虚拟机的资源 ID ccw-cyclecloud-vm ,请转到 Azure 门户。 在虚拟机视图中,选择 “设置”,然后选择 “属性”,然后找到 ResourceID

步骤 2 - 创建连接脚本

使用以下模板创建 bash 脚本。 粘贴之前获得的 CycleCloud resourceID

#!/bin/bash

resourceId=<vm_resource_id>
resourceGroup=$(echo $resourceId | cut -d'/' -f5)

az network bastion tunnel --name bastion --resource-group $resourceGroup --target-resource-id $resourceId --resource-port 443 --port 8443

注释

GitHub 存储库 https://github.com/Azure/cyclecloud-slurm-workspace.git 包含用于帮助连接的实用工具脚本 ./util/tunnel_thru_bastion.sh

步骤 3 - 创建隧道

运行创建的或更新的脚本以启动 SSH 隧道。

步骤 4 - 连接到 CycleCloud

转到 https://localhost:8443 并连接到 CycleCloud。