Run terminal and install sstp-client brew update brew install sstp-client In order to connect to your SSTP VPN with login and password use the following command line: sudo /usr/local/sbin/sstpc -log-stderr -cert-warn -user -password usepeerdns require-mschap-v2 noauth noipdefault defaultroute refuse-eap noccp. The file you’ll modify depends on which shell you’re using. If you’re using Bash, you’ll use the file /.bashprofile: nano /.bashprofile However, if you’re using ZSH, you’ll open the file /.zshrc. Nano /.zshrc Once the file opens up in the Terminal window, add the following lines to the end of the file.
| #!/bin/bash |
| SERVICE_NAME='my-example-vpn' |
| SERVICE_URL='my-example-vpn.com' |
| if [[ ${#USER}> 1 ]] |
| then |
| read -p 'Log in as ${USER}? [y/n] ' LIA |
| else |
| LIA = 'n' |
| fi |
| if [[ $LIA'y' ]] || [[ $LIA'Y' ]] |
| then |
| UN=$USER |
| else |
| read -p 'VPN Username: ' UN |
| fi |
| PW_KC=$(security find-generic-password -a $UN -s $SERVICE_NAME -w 2> /dev/null) |
| PW='' |
| if [[ ${#PW_KC}> 1 ]] |
| then |
| read -p 'Use password from keychain? [y/n] ' UPWKC |
| if [[ $UPWKC'y' ]] || [[ $UPWKC'Y' ]] |
| then |
| PW=$PW_KC |
| fi |
| fi |
| if [[ ${#PW} 0 ]] |
| then |
| read -sp 'VPN Password: ' PW |
| echo |
| read -p 'Store password in keychain? [y/n] ' UPWKC |
| if [[ $UPWKC'y' ]] || [[ $UPWKC'Y' ]] |
| then |
| security add-generic-password -a $UN -s $SERVICE_NAME -w $PW |
| fi |
| fi |
| echo -e 'nConnecting after sudo..' |
| sudo sstpc --log-stderr --log-level 1 --cert-warn --user $UN --password $PW$SERVICE_URL usepeerdns require-mschap-v2 noauth noipdefault defaultroute refuse-eap noccp |
commented Jan 11, 2017
The sstp-client package can be installed with homebrew ( |
How To Use Sstpclient For Mac Pro
commented Oct 22, 2019
How To Use Sstpclient For Macbook Air
Hello @bigonese, how can I check connection status? Thank you so much for this script. |
commented Oct 30, 2019
@ndedonald, if you use |

How To Use Sstp-client For Mac

