juniper-vpn-py
juniper-vpn-py copied to clipboard
Python module
Hello Everyone, When trying to run get this issue. Any help thank you.
[root@testvm ~]# python --version
Python 2.7.5
junos_connect.py --host vpn.myhost.com --user joeuser --stdin DSID=%DSID% openconnect --juniper %HOST% --cookie-on-stdin
Traceback (most recent call last):
File "/bin/junos_connect.py", line 20, in <module>
import tncc
File "/usr/bin/tncc.py", line 14, in <module>
ssl._create_default_https_context = ssl._create_unverified_context
AttributeError: 'module' object has no attribute '_create_unverified_context'
I had the same problem. It appears tncc works with python 2.7.9 or above only, I couldn't find any workaround apart from updating Python.
Just comment that line out. It's a hack for something or another that you don't need. ssl._create_default_https_context = ssl._create_unverified_context