0
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.

[JAWS-UG CLI] EC2 # EC2インスタンス (ログイン元アドレスの取得)

Posted at

前提条件

  1. 事前作業
    ===========
EC2インスタンス
netstat -n|grep ':22 ' |awk '{print $5}' | sed 's/:.*$//'

結果(例):

xxx.xxx.xxx.xxx

  1. ログイン元アドレスの変数設定 (ローカル)
    ==========================================
変数の設定(ローカル)
FOREIGN_ADDR='<事前作業で表示されたIPアドレス)'
変数の設定(ローカル)
VPC_SG_CIDR="${FOREIGN_ADDR}/32" \
        && echo ${VPC_SG_CIDR}
  1. 事後作業
    ===========

完了

0
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
0
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?