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.

EC2へのssh接続を名前でできるようにするためのconfigを作るためのコマンド

Posted at

UserとIdentityFileは適宜変更してください。

aws ec2 describe-instances | jq -r '[ .Reservations[].Instances[] | [ .InstanceId, (.Tags[]? | select(.Key == "Name")).Value, .PublicDnsName ]] | sort_by(.[1]) | .[] | "Host \(.[1])\nHostName \(.[2])\nUser hoge\nPort 22\nIdentityFile /path/to/key\n"'
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?