Sagemaker-ssh-helper

Latest version: v2.2.1

Safety actively analyzes 707607 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 1 of 3

2.2.1

`sm-ssh` got support for extra args, see [CLI syntax](https://github.com/aws-samples/sagemaker-ssh-helper?#sm-ssh).

`sm-local-*` scripts API refactoring, use `sm-ssh` tool with extra args instead to avoid breaking changes

64 - Deprecating Python 3.7 . Supported versions: 3.8, 3.9, 3.10, 3.11.

Improved logging and output formatting

Documentation updates: Windows instructions, troubleshooting steps, moving to CloudShell from Cloud9, IDE integration steps

IAM: Adding missing `document/SSM-SessionManagerRunShell` resource to `ssm:StartSession` action

Increased SSH timeout to prevent connection time out to slower containers like Spark Analytics

2.2.0

* (**HOT!**) Introducing FQDN scheme for SSH by host name `ssh xxx.yyy.sagemaker`. See [ssh_config section](README.mdsshconfig) in README. Closes 33 for smoothly switching instances.
* (**HOT!**) UI: Introducing `sm-ssh` CLI tool with `connect` command as the alternative to `sm-local-ssh-*` and the `list` command to show all instances that you can connect to. Moving closer to pure Python implementation as mentioned in 38. See [sm-ssh section](README.mdsm-ssh) in README.
* UI: New script `sm-ssh-deregister-instances` to be used in place of `deregister_old_instances_from_ssm.py` now as mentioned in the [FAQ.md](FAQ.mdhow-can-i-clean-up-offline-instances-from-system-manager).
* API: New method `print_ssh_info()` for the wrappers to print the useful links and commands for connection
* Added fail-on-error options to all setup scripts, resulting stronger error handling that helps with troubleshooting of SSH Helper issues. Discussed in [37](https://github.com/aws-samples/sagemaker-ssh-helper/issues/37#issuecomment-1700688788).
* Improved testing for IDE notebook through Selenium and Firefox. Introduced the class for SageMaker Studio automation (can be used to test your own notebooks, too) – [sagemaker_ssh_helper/browser_automation.py](sagemaker_ssh_helper/browser_automation.py).
* FAQ: [How to improve performance of SageMaker Studio when using remote interpreter?](FAQ.mdhow-to-improve-performance-of-sagemaker-studio-when-using-remote-interpreter)
* Fixed Windows installation and updated instructions in [FAQ.md](FAQ.mdis-windows-supported), as discussed in 38.
* Improved logic for Low GPU utilization Lambda described in [FAQ.md](FAQ.mdi-want-to-send-users-the-sms-or-email-notification-when-the-placeholder-training-job-has-issues-with-low-gpu-utilization-how-to-do-that).
* Improved logging
* Resource monitoring in tests with `pytest-monitor`
* Introducing `timedelta()` syntax instead of counting seconds in API.
* MXNet SageMaker Studio kernel image support
* Refined the docs

2.1.0

Set your SageMaker Studio domain ID and user profile name, to allow multiple users connecting to multiple domains with the same kernel gateway name:

sm-local-ssh-ide set-domain-id <<domain_id>>
sm-local-ssh-ide set-user-profile-name <<user_profile_name>>


IAM action `ssm:DeregisterManagedInstance` removed from `SSHSageMakerClientPolicy`, because instance cleanup is to be run by an admin.

32 - switch to regional STS endpoints in wrappers, to fetch the local user ID.

35 - Support HF accelerate and DeepSpeed for inference.

27 - Support Hugging Face Accelerate for training.

Support SSH into training with [SageMaker Training Compiler](https://docs.aws.amazon.com/sagemaker/latest/dg/training-compiler.html).

Support for SSH into Jupyter Server instance.
FAQ: [Can I connect from my local machine to Jupyter Server in addition to Kernel Gateways?](FAQ.mdcan-i-connect-from-my-local-machine-to-jupyter-server-in-addition-to-kernel-gateways)

Improved support for SSH Agent keys forwarding into SageMaker.
FAQ: [How do I securely forward my local private SSH keys from local machine to the remote host with SSH Agent?](FAQ.mdhow-do-i-securely-forward-my-local-private-ssh-keys-from-local-machine-to-the-remote-host-with-ssh-agent)

API: get_instance_ids() method receives an optional `timeout_in_sec` parameter that is by default 900 seconds (15 minutes), to highlight the difference from `connection_wait_time_seconds` passed to the wrapper, which is by default 600 seconds (10 minutes).

Added development journey to README.

Improved logging.

Improved troubleshooting instructions.

2.0.0

Internet-free mode support: [I'm running SageMaker in a VPC. Do I need to make extra configuration?](FAQ.mdim-running-sagemaker-in-a-vpc-do-i-need-to-make-extra-configuration)

Amazon Linux support for SageMaker Studio

[MATE desktop](https://mate-desktop.org/) is now the default environment for VNC both for Amazon Linux and Debian-based SageMaker Studio images

[Windows procedure](FAQ.mdis-windows-supported) now uses virtual env and doesn't need admin rights

Documentation improvements, more detailed architecture diagrams

Improve CI/CD testing of the code

1.12.0

31 - fixed `sm-local-configure` on macOS

FAQ:
* [When debugging a training job with SageMaker SSH Helper and train_placeholder.py, I want to automatically stop the job when there are no users connected and there's no GPU utilization. How to do that?](FAQ.mdwhen-debugging-a-training-job-with-sagemaker-ssh-helper-and-training-placeholder-i-want-to-automatically-stop-the-job-when-there-are-no-users-connected-and-theres-no-gpu-utilization-how-to-do-that)
* [I want to send users the SMS or email notification when the placeholder training job has issues with low GPU utilization. How to do that?](FAQ.mdi-want-to-send-users-the-sms-or-email-notification-when-the-placeholder-training-job-has-issues-with-low-gpu-utilization-how-to-do-that)


`sm-wait stop` now have to be used instead of pkill to gracefully shut down the waiting loop

IAM policy `SSHSageMakerServerPolicy` changes – `ssm:ListInstanceAssociations` requires `*` as a resource name to avoid errors in logs (see [IAM_SSM_Setup.md](IAM_SSM_Setup.md) for more details).

CDK apps has been split (see [IAM_SSM_Setup.md](IAM_SSM_Setup.md) for more details):
* sagemaker_ssh_helper.cdk.iam_ssm_app
* sagemaker_ssh_helper.cdk.advanced_tier_app

API Changes:
* `ssh_wrapper.training_job_name()` instead of ssh_wrapper.latest_training_job_name()
* `sm-ssh-ide get-metadata` to print SageMaker Studio details to connect
* `sm-ssh-ide set-local-user-id "$LOCAL_USER_ID"` and `sm-ssh-ide init-ssm` instead of a single init-ssm command.

Added the tip to set the Web VNC screen resolution with `xrandr`

`sm-save-env` now handles special symbols and quotes in variables

Improve CI/CD testing of the code

1.11.0

IAM/SSM policy update - needs `ssm:GetCommandInvocation` permission for better performance – [2628c4f](https://github.com/aws-samples/sagemaker-ssh-helper/commit/2628c4fd1afcfcb8519)
IAM/SSM policy update - needs `*` for `ssm:ListInstanceAssociations` to avoid errors in logs – 049f97b

28 – fixed issue with new SageMaker Python SDK: Invalid bucket name "sagemaker.config INFO - Fetched defaults config from location: ": Bucket name must match the regex. The change related to SageMaker defaults :
https://github.com/aws/sagemaker-python-sdk/pull/3872/files

Added support for [SageMaker defaults](https://aws.amazon.com/about-aws/whats-new/2023/03/amazon-sagemaker-python-sdk-default-values-parameters/)
Improved MME support for TF
Added support for pre-trained HuggingFace models
Better support for popular SageMaker Studio images
Support attaching to already submitted training jobs with `SSHEstimatorWrapper.attach()`

Documented alternative way to add SSH Helper dependency through `requirements.txt`

Page 1 of 3

© 2025 Safety CLI Cybersecurity Inc. All Rights Reserved.