2

我想使用 opencoonect 连接到 vpn 我们公司使用谷歌验证码

4

2 回答 2

4

使用它在您的电脑上创建 2 个因子代码https://github.com/arcanericky/ga-cmd
将您的帐户密码存储在~/.cisco/pass.txt

然后用这个连接到vpn

echo -e "$(sudo cat ~/.cisco/pass.txt)\n$(./ga-cmd <your-ga-site-name>)" | sudo openconnect --user=<username> --passwd-on-stdin <your-vpn.com>
于 2020-08-03T15:38:51.010 回答
2

或者您可以使其与 oathtool 一起使用(适用于 macOS 用户):

alias vpn="echo -e '${YOUR_PWD}\n$(cat ~/.totp_google | xargs oathtool --totp -b)' | \
  sudo openconnect {YOUR_VPN_HOST} --user=${YOUR_USERNAME} --passwd-on-stdin"

你的秘密应该~/.totp_google存档。

于 2020-09-23T08:41:58.187 回答