Skip to content

Bash Scripts

Password Changing Scripts

Like with PowerShell, within Privilege Vault you can configure Privilege Vault to execute an SSH script after a remote password change occurs. Unlike PowerShell, however, the SSH script will run on the remote machine, click here for more information.

Using secrets within your SSH script

Password changing scripts are excellent, and often go-tos for quick-wins. There are, however, times when you need to do something more advanced. Or, access more than one secret to complete the dependancy.

In that case, the Privilege Vault Software Development Kit for DevOps (click here) is compatible for Linux or Windows, and gives you access to secrets via Command Line interface (CLI). You can then integrate a simple command into your SSH script to pull the secert.

For example:

var_usn = ./path/to/tss secret -s 100 -f username;
var_pwd = ./path/to/tss secret -s 100 -f password;

mount -t cifs //remote/file/share /mnt/example -o 'username=$var_usn,domain=domain.local,password=$var_pwd'