You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In-so-far as the permissions go... if phpseclib is running as one user and the key was created by another use then that'd be why phpseclib can't read it with owner read only on they keyfile. To work around this you could do a number of things.
#3
Open
Mohzxz opened this issue
Mar 18, 2024
· 0 comments
In-so-far as the permissions go... if phpseclib is running as one user and the key was created by another use then that'd be why phpseclib can't read it with owner read only on they keyfile. To work around this you could do a number of things.
You could copy / paste the keyfile's contents into the PHP file as a string and then pass the string to to PublicKeyLoader.
You could make PHP run as the same user as the key is owned by
You could put the key and the user that PHP is running as into the same group and then enable group read vs just public read.
You could use ssh-agent to get store and retrieve the key
As for phpseclib not being able to read a PuTTY key... it supports both of these styles of keys:
If you have a key that phpseclib can't read you'll need to share it with me so that I might reproduce the problem. If you don't want the world t see the key yo ucan email it to [email protected].
I don't think a private key should ever be set to be read publicly, so I'm not sure what's going on. Is it the intention of phpseclib to only work with a publicly readable private key?
There's nothing phpseclib can do about this. If the user phpseclib is created as didn't create the key and you have it so that only the owner of the key can read it then there's not much phpseclib can do about that. And that's not a phpseclib thing - that's a Linux thing.
As for phpseclib not being able to read a PuTTY key... it supports both of these styles of keys:
If you have a key that phpseclib can't read you'll need to share it with me so that I might reproduce the problem. If you don't want the world t see the key yo ucan email it to [email protected].
There's nothing phpseclib can do about this. If the user phpseclib is created as didn't create the key and you have it so that only the owner of the key can read it then there's not much phpseclib can do about that. And that's not a phpseclib thing - that's a Linux thing.
Originally posted by @terrafrost in phpseclib/phpseclib#1951 (comment)
The text was updated successfully, but these errors were encountered: