Repository navigation
amazon_ec2
taka512 edited this page Oct 27, 2015
·
1 revision
amazon ec2についてのメモ
「Launch Instance」からamazonマーケットプレイスを選択してCentOsをインストール
まずはログインする
$ chmod 600 symfony21.pem
$ ssh -i symfony21.pem root@ec2-176-32-66-48.ap-northeast-1.compute.amazonaws.com
ログイン後にCentOSの設定
普通に設定する場合
$ mv ~/Downloads/xxxx.pem ~/.ssh/xxxx.pem
$ chmod 400 ~/.ssh/xxxx.pem
$ vi .ssh/config
Host ec2
User ec2-user
HostName ec2-46-51-224-48.ap-northeast-1.compute.amazonaws.com
IdentityFile ~/.ssh/taka512.pem
$ ssh ec2
EC2を便利につかう.ssh/configの書きかた
$ vi .ssh/config
Host *.ap-northeast-1.compute.amazonaws.com
identityfile ~/.ssh/taka512.pem
user ec2-user
https://github.com/mirakui/ec2ssh