~/.ssh/configに書く

host vamdemic.eks-deploy-dev                                                                                           User ec2-user
  IdentityFile ~/.ssh/vamdemic_aws.pem
  ProxyCommand sh -c "aws ssm start-session --profile vamdemic --target %h --document-name AWS-StartSSHSession --region ap-northeast-1 --parameters 'portNumber=%p'"
  HostName      i-11111111111111111

インストールしておくもの
https://docs.aws.amazon.com/ja_jp/cli/latest/userguide/cli-chap-install.html
https://docs.aws.amazon.com/ja_jp/systems-manager/latest/userguide/session-manager-getting-started-enable-ssh-connections.html

<スポンサーリンク>

コメントを残す

メールアドレスが公開されることはありません。 が付いている欄は必須項目です

*

日本語が含まれない投稿は無視されますのでご注意ください。(スパム対策)