リスト6.1 多段接続の設定ファイル(.ssh/config)
Host bastion
Hostname (踏み台サーバーのパブリックIP)
User ec2-user
IdentityFile ~/.ssh/(開発者の.pemファイル)
Host web01
Hostname (web01サーバーのプライベートIP)
User ec2-user
IdentityFile ~/.ssh/(開発者の.pemファイル)
ProxyCommand ssh.exe bastion -W %h:%p
Host web02
Hostname (web02サーバーのプライベートIP)
User ec2-user
IdentityFile ~/.ssh/(開発者の.pemファイル)
ProxyCommand ssh.exe bastion -W %h:%p