2
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

AlibabaCloudのROSからAuto ScalingでECSを起動した後にSSHで接続する方法

Last updated at Posted at 2018-06-14

はじめに

AlibabaCloudのROSからAuto ScalingでECSを起動してみる
の記事で足りない点があります。

今回はそちらに触れたいと思います。
ROSで起動はできてます。

足りない点それは、サーバにsshログインができません。

さて何が足りてないでしょうか?

足りない点とは?

それは、KeyPairNameです。
ECSにパスワードを設定はできますが、多く起動したら設定するのは大変ですね。

なぜ、今回は設定がなかったのでしょうか?

阿里云帮助中心

日本語ALIYUN::ESS::ScalingConfiguration

英語ALIYUN::ESS::ScalingConfiguration
のページにはないパラメータが本家にあります。

ROSテンプレートを下のように変えます。

    "ScalingConfiguration": {
      "Metadata": {
        "GraphicId": "RosGraphicElement-13"
      },
      "Type": "ALIYUN::ESS::ScalingConfiguration",
      "Properties": {
        "SystemDiskCategory": "cloud_ssd",
        "InstanceType": {
          "Ref": "InstanceType"
        },
        "KeyPairName": {
          "Ref": "KeyPair"
        },
        "SecurityGroupId": {
          "Ref": "SG"
        },
        "ImageId": {
          "Ref": "ImageId"
        },
        "InternetMaxBandwidthOut": 1,
        "IoOptimized": "optimized",
        "ScalingGroupId": {
          "Ref": "ScalingGroup"
        },
        "InternetChargeType": "PayByTraffic",
        "InternetMaxBandwidthIn": 200,
        "ScalingConfigurationName": {
          "Ref": "ALIYUN::StackName"
        }
      }
    },

ROSを起動後、ECSにsshで接続します

[f_prg@Documents] $ ssh root@XX.XX.XX.XX -i ~/.ssh/YYYYYYYYYYYYYY.pem
Welcome to Alibaba Cloud Elastic Compute Service !

[root@iZ6weaorr4gydoa6ohwtx5Z ~]#

ということで、ssh接続ができました。^ o ^/

さいごに

本家のドキュメントが中国語なので
翻訳ができていると嬉しいところですが
今回はそういった場合の対処方法、調べ方があるということをお伝えしました。

2
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?