Virtualization, Servers and Storage : VSS: using TOTP in vss cli scripting

We can generate TOTP using this Python script but need to create/add and then extract the secure key first usinghttps://raivo-otp.com/ Remember the master password during RAIVO App installation, it will be used to encrypt the exported .zip

IMG_8950.jpg

Save/export the resulted password protected (with RAIVO master password) .zip file with secret code

#!/usr/bin/env python
import pyotp

secret_key = "ZDXXXXXXXXXXXXXXXXXXXXXXXXXXYYYG"
totp = pyotp.TOTP(secret_key)
otp_code = totp.now()
print(f"{otp_code}")

Save this script as ./get-totp.py

chmod og-rwx ./get-totp.py
cmod o+x ./get-totp.py

Testing

./get-totp.py                    
081482

Using TOTP via --totp

echo "Y" |  vss  --wait  -e cloud-api-dev   --totp $(./get-totp.py)  compute inventory mk --all --fmt csv

Attachments:

IMG_8950.jpg (image/jpeg)