11 lines
424 B
Plaintext
11 lines
424 B
Plaintext
// This script demonstrates how to list all SSH keys in your Hetzner Cloud project.
|
|
|
|
// Initialize the Hetzner client with your API token.
|
|
let client = new_hetzner_client(get_env("HETZNER_API_TOKEN"));
|
|
|
|
// Retrieve the list of all SSH keys.
|
|
print("Listing all SSH keys...");
|
|
let ssh_keys = client.list_ssh_keys();
|
|
|
|
// The `show_table` method formats the SSH key list into a user-friendly table.
|
|
print(ssh_keys.show_table()); |