Open htaymour opened 11 months ago
Can you please help me : I'm trying to use the e-token to access SSH remote server authenticating using my card certificate . I installed opensc and tried to access the usb card but with failure. Can you please indicate which DLL's to use to be able to access my token card. I have the safenet client tools installed and I have tried using all the dll under it's subfolder "C:\Program Files\SafeNet\Authentication\SAC\x64>" with no sucess.
PPS C:\Program Files\OpenSC Project\OpenSC\tools> .\pkcs11-tool.exe -L Available slots: Slot 0 (0x0): AKS ifdh 0 (token not recognized)
Your first error looks like it doesn't have a config file -- a crystoki.ini. Do any other tools work (lunacm, vtl, etc)? If they do, then we can diagnose further, otherwise looks like a installation/config problem (and not specifically related to pycryptoki).
As far as Safenet Authentication Client - unsure, you'd have to check docs/support for that product, it's unrelated to this project unfortunately
Hello @astraw38 , Thanks alot for your reply and concern and wishing you a great new year. For the first error (AttributeError: function 'C_Initialize' not found), it's still there and yes the safenet authentication tool from gemalto is working fine and authentiationg web sites. Also I have configured ssh access to use CAPI (etoken auth.) on secure CRT and I it's working as I have access to remote ssh server authenticating by the card token with no issue.
I want to use the same authentiation (token card) when using python to ssh to remote server using token authentiation. I use paramiko to gain access to the remote server via ssh. I try to import the certificate (.cer) and use it as ssh key but it looks like it needs to read it from the card and not exported on my local drive to work. Can you help me to build cryptoki.ini and which dll's to point to. Please indicate the path for the file locations.
I believe there's some confusion about this project -- it's an interface for PKCS11, specifically for use for Thales Luna HSMs. If you're not using the LunaClient/Luna HSM, there would need to be significant forking & changes to support. You could theoretically try to use a PKCS11-compatible DLL/shared lib via the CRYSTOKI_CONF_DLL
environment variable (set it directly to a path pointing to the p11 dll).
Beyond that, you'd still need to have an adapter or something for paramiko to use the keystore via pycryptoki/p11. I'd personally think using ssh-agent would be much easier, since there's support for that in paramiko, and I would assume you could hook up CAPI to ssh-agent as well.
Hello @astraw38 , Yes you are totally correct. I found out that this authentication automation is already implmented with an ssh-agent putty-CAC which reads the token and automatically use it when needed from any application including python ssh connection or even command line direct ssh access. Thanks again :)
Hello Team, I'm trying to use the etoken 5110 for authentication using SSH but I'm not able to load the dll file correctly as showen in my logs below . Could you please advise which dll should I be pointing to and where should I add the path to it. Please note that Cryptoki2.ini file does not exist so I think it's looking using defaults.py Please advise how do I add this section to defaults.py