~/.ssh/configに書く
1 2 3 4 |
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