π SSH Keys
Get all SSH keys
HetznerCloudClient hetznerCloudClient = new HetznerCloudClient("ApiKey");
List<SshKey> list = await hetznerCloudClient.SshKey.Get();Get a SSH key
HetznerCloudClient hetznerCloudClient = new HetznerCloudClient("ApiKey");
long sshKeyId = 13121954;
SshKey sshKey = await hetznerCloudClient.SshKey.Get(sshKeyId);Create an SSH key
HetznerCloudClient hetznerCloudClient = new HetznerCloudClient("ApiKey");
// We rely on the 'SshKeyGenerator' library to generate SSH credentials.
SshKeyGenerator.SshKeyGenerator sshKeyGenerator = new SshKeyGenerator.SshKeyGenerator(2048);
string name = $"name";
string pub = sshKeyGenerator.ToRfcPublicKey($"{Guid.NewGuid()}");
SshKey sshKey = await hetznerCloudClient.SshKey.Create(name, pub);Update an SSH key
Delete a Volume
JSON
Last updated