Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SSHFS with tpm2 #835

Open
JulianGodd opened this issue Apr 8, 2023 · 0 comments
Open

SSHFS with tpm2 #835

JulianGodd opened this issue Apr 8, 2023 · 0 comments

Comments

@JulianGodd
Copy link

JulianGodd commented Apr 8, 2023

Is it possible to use this with sshfs?
I'd love to mount a drive over ssh with a key from my tpm.

I've tried passing it in as IdentityFile

sshfs -o allow_other,IdentityFile="/usr/lib/pkcs11/libtpm2_pkcs11.so" [email protected]:/source_dir/ /mnt/some_dir/

but it complains that

Permissions 0755 for '/usr/lib/pkcs11/libtpm2_pkcs11.so' are too open.
It is required that your private key files are NOT accessible by others.
This private key will be ignored.
Load key "/usr/lib/pkcs11/libtpm2_pkcs11.so": bad permissions

And if I restrict the permissions for a different symbolic link to 400

Load key "/usr/lib/pkcs11/libtpm2_pkcs11-perms.so": error in libcrypto

I also tried passing it as PKCS11Provider like how you would in your ssh config

sudo sshfs -o allow_other,PKCS11Provider="/usr/lib/pkcs11/libtpm2_pkcs11.so"  [email protected]:/source_dir/ /mnt/some_dir/

But I just get

[email protected]: Permission denied (publickey).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant