VirtualMachineSshSettings Class

SSH settings for a virtual machine.

Inheritance
builtins.object
VirtualMachineSshSettings

Constructor

VirtualMachineSshSettings(*, admin_username: str, admin_password: str | None = None, ssh_port: int = 22, ssh_private_key_file: str | None = None)

Parameters

Name Description
admin_username
Required
str

The admin user name. Defaults to None.

admin_password
Required

The admin user password. Defaults to None. Required if ssh_private_key_file is not specified.

ssh_port
Required
int

The ssh port number. Default is 22.

ssh_private_key_file
Required

Path to the file containing the SSH rsa private key. Use "ssh-keygen -t rsa -b 2048" to generate your SSH key pairs. Required if admin_password is not specified.

Keyword-Only Parameters

Name Description
admin_username
Required
admin_password
Required
ssh_port
Default value: 22
ssh_private_key_file
Required

Examples

Configuring a VirtualMachineSshSettings object.


   from azure.ai.ml.entities import VirtualMachineSshSettings

   ssh_settings = VirtualMachineSshSettings(
       admin_username="azureuser",
       admin_password="azureuserpassword",
       ssh_port=8888,
       ssh_private_key_file="../tests/test_configs/compute/ssh_fake_key.txt",
   )