Skip to content

Commit

Permalink
Update accessing-ec2s.html.md.erb (#6116)
Browse files Browse the repository at this point in the history
  • Loading branch information
georgepstaylor authored Feb 2, 2024
1 parent 1eac49d commit d6b6279
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion source/user-guide/accessing-ec2s.html.md.erb
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ Host glados-test-bastion
LogLevel QUIET
IdentityFile ~/.ssh/id_rsa
User jane
ProxyCommand sh -c "aws ssm start-session --target $(aws ec2 describe-instances --no-cli-pager --filters "Name=tag:Name,Values=bastion_linux" --query 'Reservations[0].Instances[0].InstanceId' --profile glados-test-developer | tr -d '"') --document-name AWS-StartSSHSession --parameters 'portNumber=%p' --profile glados-test-developer --region eu-west-2"
ProxyCommand sh -c "aws ssm start-session --target $(aws ec2 describe-instances --no-cli-pager --filter "Name=tag:Name,Values=bastion_linux" --filter "Name=instance-state-code,Values=16" --query 'Reservations[0].Instances[0].InstanceId' --profile glados-test-developer | tr -d '"') --document-name AWS-StartSSHSession --parameters 'portNumber=%p' --profile glados-test-developer --region eu-west-2"
```

>Note: The bastion server is re-created on daily basis which causes the host identification to change. When the user connects to the bastion using SSH, the SSH client warns about the host identification change. In the above, the configuration `StrictHostKeyChecking no`, `UserKnownHostsFile /dev/null` and `LogLevel QUIET` is added to prevent the `WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED!` by the SSH client. If we didn't add the above, the user would have to manually remove the old host key from `~/.ssh/known_hosts` on daily basis, which could be annoying.
Expand Down

0 comments on commit d6b6279

Please sign in to comment.