Class SshPublicKey
java.lang.Object
com.azure.resourcemanager.hybridnetwork.models.SshPublicKey
Contains information about SSH certificate public key and the path on the Linux VM where the public key is placed.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionkeyData()
Get the keyData property: SSH public key certificate used to authenticate with the VM through ssh.path()
Get the path property: Specifies the full path on the created VM where ssh public key is stored.void
validate()
Validates the instance.withKeyData
(String keyData) Set the keyData property: SSH public key certificate used to authenticate with the VM through ssh.Set the path property: Specifies the full path on the created VM where ssh public key is stored.
-
Constructor Details
-
SshPublicKey
public SshPublicKey()Creates an instance of SshPublicKey class.
-
-
Method Details
-
path
Get the path property: Specifies the full path on the created VM where ssh public key is stored. If the file already exists, the specified key is appended to the file. Example: /home/user/.ssh/authorized_keys.- Returns:
- the path value.
-
withPath
Set the path property: Specifies the full path on the created VM where ssh public key is stored. If the file already exists, the specified key is appended to the file. Example: /home/user/.ssh/authorized_keys.- Parameters:
path
- the path value to set.- Returns:
- the SshPublicKey object itself.
-
keyData
Get the keyData property: SSH public key certificate used to authenticate with the VM through ssh. The key needs to be at least 2048-bit and in ssh-rsa format. <br><br> For creating ssh keys, see [Create SSH keys on Linux and Mac for Linux VMs in Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-mac-create-ssh-keys?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json).- Returns:
- the keyData value.
-
withKeyData
Set the keyData property: SSH public key certificate used to authenticate with the VM through ssh. The key needs to be at least 2048-bit and in ssh-rsa format. <br><br> For creating ssh keys, see [Create SSH keys on Linux and Mac for Linux VMs in Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-mac-create-ssh-keys?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json).- Parameters:
keyData
- the keyData value to set.- Returns:
- the SshPublicKey object itself.
-
validate
public void validate()Validates the instance.- Throws:
IllegalArgumentException
- thrown if the instance is not valid.
-