22 lines
1.1 KiB
Plaintext
22 lines
1.1 KiB
Plaintext
// Get all SSH keys and print them in a table
|
|
let keys = hetzner.get_ssh_keys();
|
|
keys.pretty_print();
|
|
|
|
// Get a specific SSH key
|
|
// Replace "13:dc:a2:1e:a9:d2:1d:a9:39:f4:44:c5:f1:00:ec:c7" with the fingerprint of the key you want to fetch
|
|
// let key = hetzner.get_ssh_key("13:dc:a2:1e:a9:d2:1d:a9:39:f4:44:c5:f1:00:ec:c7");
|
|
// print(key);
|
|
|
|
// Add a new SSH key
|
|
// Replace "my-new-key" with the desired name and "ssh-rsa ..." with your public key data
|
|
// let new_key = hetzner.add_ssh_key("vanheesm@incubaid.com", "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIFyZJCEsvRc0eitsOoq+ywC5Lmqejvk3hXMVbO0AxPrd");
|
|
// print(new_key);
|
|
|
|
// Update an SSH key's name
|
|
// Replace "cb:8b:ef:a7:fe:04:87:3f:e5:55:cd:12:e3:e8:9f:99" with the fingerprint of the key you want to update
|
|
// let updated_key = hetzner.update_ssh_key_name("e0:73:80:26:80:46:f0:c8:bb:74:f4:d0:2d:10:2d:6f", "my-updated-key-name");
|
|
// print(updated_key);
|
|
|
|
// Delete an SSH key
|
|
// Replace "cb:8b:ef:a7:fe:04:87:3f:e5:55:cd:12:e3:e8:9f:99" with the fingerprint of the key you want to delete
|
|
// hetzner.delete_ssh_key("e1:a7:27:ed:12:77:6a:4c:3a:cd:30:18:c4:f3:d0:88"); |