Skip to content

Commit 21b0702

Browse files
authored
Update README.md
1 parent ce0fb4f commit 21b0702

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

README.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,12 +32,14 @@ Open an SSH connection to your ec2 instances via AWS SSM without the need to ope
3232
```
3333

3434
#### Open SSH Connection
35-
* Ensure AWS CLI environemnt variables are set properly e.g. `export AWS_PROFILE=default` or `AWS_PROFILE=default ssh ... <INSTACEC_USER>@<INSTANCE_ID>`
36-
* If default region does not match instance region you need to provide it like this `<INSTACEC_USER>@<INSTANCE_ID>--<INSTANCE_REGION>`
35+
* Ensure AWS CLI environemnt variables are set properly e.g.
36+
* `export AWS_PROFILE=default` or `AWS_PROFILE=default ssh ... <INSTACEC_USER>@<INSTANCE_ID>`
37+
* If default region does not match instance region you need to provide it e.g.
38+
* `<INSTACEC_USER>@<INSTANCE_ID>--<INSTANCE_REGION>`
3739
###### SSH Command with SSH Config Setup
3840
`ssh <INSTACEC_USER>@<INSTANCE_ID>`
3941
###### SSH Command with ProxyCommand CLI Option
40-
`ssh -o ProxyCommand="aws-ssm-ec2-proxy-command.sh %h %r %p ~/.ssh/id_rsa.pub" <INSTACEC_USER>@<INSTANCE_ID>`
42+
`ssh -i "~/.ssh/id_rsa" -o ProxyCommand="~/.ssh/aws-ssm-ec2-proxy-command.sh %h %r %p ~/.ssh/id_rsa.pub" <INSTACEC_USER>@<INSTANCE_ID>`
4143

4244
## Alternative Implementation with `ec2-instance-connect`
4345
* Ensure [Prerequisits](#prerequisits)

0 commit comments

Comments
 (0)