Failed to determine type of private key
Liam Healy
lnp at healy.washington.dc.us
Sun Apr 19 07:42:41 PDT 2015
I am trying to write a script to connect to a server which I can
successfully connect to using the Network Manager interface to
OpenConnect. My script is:
NAME="myusername"
GROUP="MYGROUP"
PIDFILE="openconnect.pid"
CERT="/etc/ssl/certs/servercert.pem"
HOST="https://vpn.example.com"
SCRIPT="/etc/vpnc/vpnc-script"
openconnect -b -c $CERT --script $SCRIPT --pid-file=$PIDFILE
--user=$NAME --usergroup=$GROUP
What I expect when I run this from the shell is that I will be
prompted for my password and then I will connect to the server, as
happens when run from network manager. What I get is:
POST https://vpn.example.com/MYGROUP
Attempting to connect to server 1.1.1.4:443
Failed to determine type of private key /etc/ssl/certs/servercert.pem
Loading certificate failed. Aborting.
Failed to open HTTPS connection to vpn.example.com
GET https://vpn.example.com/MYGROUP
Attempting to connect to server 1.1.1.6:443
Failed to determine type of private key /etc/ssl/certs/servercert.pem
Loading certificate failed. Aborting.
Failed to open HTTPS connection to vpn.example.com
Failed to obtain WebVPN cookie
and no connection. On nm, I do get a message "SSL certificate
authentication failed", but it connects.
My questions: How do I connect to the VPN from the command line? How
do I remove the message about the certificate authentication when
using nm? Is it possible to find out the command-line equivalent of
what nm is doing?
Ubuntu 14.04LTS
OpenConnect version v5.02
Using GnuTLS. Features present: PKCS#11, TOTP software token, DTLS
(using OpenSSL)
Linux 3.13.0-39-generic #66-Ubuntu SMP Tue Oct 28 13:30:27 UTC 2014
x86_64 x86_64 x86_64 GNU/Linux
Thank you,
Liam
More information about the openconnect-devel
mailing list