Signing back into the Community for the first time? You'll need to reset your password to access your account. Find out more.
Forum Discussion
florianthievessen
2 years agoNew Contributor
Feature Requests: add option to copy password + otp in single step
Hello!
To login into our company vpn via Tunnelblick, it's required to enter the normal password + otp as one single password in the password field, which requires two times switching to 1password...
qw3r
12 months agoNew Contributor
Hi,
although it's not exactly what you need by it's easy to modify my solution for your needs:
Here's a simple script to automate the process:
```
!/bin/sh
sudo -u YourUserName /opt/homebrew/bin/op item get idOfTheItemWithTheOTP --otp
```
in the script above replace YourUserName
with your username and idOfTheItemWithTheOTP
with the id of the item in 1Password that contains the OTP.
(to find out the id of the item you can use the op item list
command and look for the item with the OTP for the VPN.
- place the script to
~/Library/Application\ Support/Tunnelblick/Configurations/<name of the OVPN configuration>.tblk/Contents/Resources/password-replace.user.sh
- set the script to be executable (
chmod +x password-replace.user.sh
) - next time when you connect to the VPN, Tunnelblick will ask you to save the configuration (again).
- Then you can tell Tunnelblick to save the username and password in the keychain, for the password use any string, as it will be replaced by actual OTP before the connection.
- from now on, you will prompted a challenge by 1password (touchid, or password popup, based on your preferences) to connect the Emarsys VPN.
For your needs you might have to name the password-append.user.sh
and the returned string (the OTP) will be appended to the saved password (from the keychain)
(more on available scripts: https://tunnelblick.net/cUsingScripts.html)
Goes without saying, but you need to have 1Password CLI installed and configured for this to work. (https://1password.com/downloads/command-line/)
Hope it can be of help to some of you!