File tree Expand file tree Collapse file tree 1 file changed +10
-0
lines changed
src/sagemaker/modules/train/container_drivers Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -76,6 +76,16 @@ def start_sshd_daemon():
7676
7777
7878class CustomHostKeyPolicy (paramiko .client .MissingHostKeyPolicy ):
79+ """Class to handle host key policy for SageMaker distributed training SSH connections.
80+ Example:
81+ >>> client = paramiko.SSHClient()
82+ >>> client.set_missing_host_key_policy(CustomHostKeyPolicy())
83+ >>> # Will succeed for SageMaker algorithm containers
84+ >>> client.connect('algo-1234.internal')
85+ >>> # Will raise SSHException for other unknown hosts
86+ >>> client.connect('unknown-host') # raises SSHException
87+ """
88+
7989 def missing_host_key (self , client , hostname , key ):
8090 """Accept host keys for algo-* hostnames, reject others.
8191
You can’t perform that action at this time.
0 commit comments