Skip to content

Commit dedd69e

Browse files
chore(docs): Update README.md (#25)
Better SSH config Co-authored-by: Andrew Hammond <445764+ahammond@users.noreply.github.com>
1 parent cc4bad9 commit dedd69e

File tree

1 file changed

+12
-5
lines changed

1 file changed

+12
-5
lines changed

README.md

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -36,11 +36,8 @@ You only have to run these steps once, but you need to do it before you try conn
3636
1. [Install](https://docs.aws.amazon.com/systems-manager/latest/userguide/session-manager-working-with-install-plugin.html) the session manager plugin:
3737

3838
```bash
39-
curl "https://s3.amazonaws.com/session-manager-downloads/plugin/latest/mac/sessionmanager-bundle.zip" -o "sessionmanager-bundle.zip"
40-
unzip sessionmanager-bundle.zip
41-
42-
# use python3 instead of python2 on your mac
43-
python3 sessionmanager-bundle/install
39+
# On a Mac, you may need to allow this in System Preferences -> Security
40+
brew install session-manager-plugin
4441
```
4542

4643
2. Make sure the following is in your `~/.ssh/config`:
@@ -49,6 +46,16 @@ python3 sessionmanager-bundle/install
4946
# SSH over Session Manager
5047
Host i-* mi-*
5148
ProxyCommand sh -c "aws ssm start-session --target %h --document-name AWS-StartSSHSession --parameters 'portNumber=%p'"
49+
# Keep connection from closing on you due to agressive SSM timeouts, but close it when the other side stops caring
50+
TCPKeepAlive yes
51+
ServerAliveInterval 15
52+
# Never Forward agents to remove machines you don't know
53+
ForwardAgent no
54+
# If you need to scp or portforward a lot, using a control channle will help. Be sure to create the ControlPath first
55+
# ControlMaster auto
56+
# ControlPath ~/.ssh/control/%C
57+
# ControlPersist 30
58+
5259
```
5360

5461
3. Get the SSH key such as `~/.ssh/myAccount-MyStackJump.pem`:

0 commit comments

Comments
 (0)