1
1

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.

eb sshコマンドを使うためには

Posted at

eb sshコマンドを使うためには

cd 対象プロジェクトフォルダ
pip install awsebcli --upgrade --user

key.pemを~/.ssh/ 直下にコピー
chmod 600 ~/.ssh/*.pem

もしかしたら、フォルダ権限とownerに変更も必要
sudo chmod 700 /home/user/.ssh
chown user:user /home/user/.ssh

vi ~/.ssh/config

host 対象プロジェクト名*
  User ec2-user
  StrictHostKeyChecking no
  ProxyCommand ssh -A localhost -W `N=$(grep -o '[0-9]\+$' <<< %h || echo 1); E=$(perl -pe 's/\d+$//' <<< %h); curl -s https://altvsxa2kj.execute-api.ap-northeast-1.amazonaws.com/prod/eb/$E/ip/$N`:%p

chmod 600 ~/.ssh/config

1
1
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
1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?