2 Answers
- Newest
- Most votes
- Most comments
0
Hello! SSM has the AWS-StartInteractiveCommand document. For more information you can read the following links:
- https://docs.aws.amazon.com/systems-manager/latest/userguide/session-manager-restrict-command-access.html
- https://aws.amazon.com/blogs/mt/limit-ssm-interactive-session-commands-by-users/
Please let me know if the above helps!
0
Systems Manager allows you to use your SSH client to interactively access instances without requiring network ingress to your EC2 instances.
You will need:
- An SSH client that can be configured with
ProxyCommand
, such as OpenSSH; and - A recent version of the AWS CLI installed.
Once you have that, you can set up your SSH configuration file to access your instances, like so:
# ~/.ssh/config file
# SSH over Session Manager
host i-* mi-*
ProxyCommand sh -c "aws ssm start-session --target %h --document-name AWS-StartSSHSession --parameters 'portNumber=%p'"
Then, when you run something like ssh i-01234567890
, the session will be transported via SSM.
If your multi-session manager uses the standard ssh
program under the hood, your experience should be identical to that of using ssh
directly.
See Enabling SSH connections for Session Manager for details.
Relevant content
- asked 5 months ago
- Accepted Answerasked 2 years ago
- asked a year ago
- AWS OFFICIALUpdated 3 years ago
- AWS OFFICIALUpdated 4 months ago
- AWS OFFICIALUpdated a year ago
- AWS OFFICIALUpdated 2 years ago