Last active
March 18, 2022 19:47
-
-
Save ph00lt0/cf47f5b12ba2ab9e72aa81bce733f86f to your computer and use it in GitHub Desktop.
Delete an ip to revoke ssh access from the IP address to hetzner cloud through the Hetzner cli. This is useful when ip address changed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
hcloud firewall list | |
read -p "Enter the Firewall ID you want to remove a IP to:" firewallID | |
hcloud firewall describe $firewallID | |
read -p "Enter the IP you want to remove your IP to:" ip | |
hcloud firewall delete-rule --direction in --protocol tcp --port 22 --source-ips $ip/32 $firewallID |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment