Skip to content

With this python script you will be able to monitor the expiration date of your Azure SSH Keys and your Personal Access Tokens. The output message will tell you if your SSH Keys or PAT will expire in 1 month or less.

Notifications You must be signed in to change notification settings

kevinn-1/AzureSSHKeys_TokensMonitoring

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 

Repository files navigation

Azure SSH keys and PAT expiration monitoring

This python script was created to monitor the expiration date of Azure Personal Access Tokens (PAT) and SSH Keys.

It basically uses 2 APIs, one for SSK Keys and the other one for PAT. The APIs respond in a JSON object so the script basically goes through the JSON objects gathering different information and validating if the PAT/SSH Keys are still valid or not.

If any PAT/SSH Key will expire within the next 30 days, the script will show a message that says:

PAT/SSH Key: "NAME OF KEY" will EXPIRE in one month or less

and exit with the corresponding error code (2).


Important:

To be able to use the script, you first need to create a PAT and provide it to the script, otherwise there is no way to authenticate to Azure.

About

With this python script you will be able to monitor the expiration date of your Azure SSH Keys and your Personal Access Tokens. The output message will tell you if your SSH Keys or PAT will expire in 1 month or less.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages