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
Currently vssh.GetConfigPEM() function expects to read the key from a file on disk via: key, err := ioutil.ReadFile(keyFile)
but when using vssh as a library it can be not very convenient to generate a new key, write it to disk and then read it from disk again in GetConfigPEM(). Instead it would be great to have the option to generate a private key and feed it directly from memory to either GetConfigPEM() or a similar function like GetConfigFoo(user string, block *pem.Block) or GetConfigFoo(user string, block []byte).
Let me know what are your thoughts :)
The text was updated successfully, but these errors were encountered:
vSSH uses standard ssh client config from Go ssh library (*ssh.ClientConfig) so developer can create their own function to generate it. as you said you can create GetConfigFoo(.....) *ssh.ClientConfig
In fact I added the GetConfigPEM as sample at helper Go file but what I like in this case is remote secret managements like Vault Hashicorp. I think getting the pem block from them is a great solution!
Currently vssh.GetConfigPEM() function expects to read the key from a file on disk via:
key, err := ioutil.ReadFile(keyFile)
but when using vssh as a library it can be not very convenient to generate a new key, write it to disk and then read it from disk again in
GetConfigPEM()
. Instead it would be great to have the option to generate a private key and feed it directly from memory to eitherGetConfigPEM()
or a similar function likeGetConfigFoo(user string, block *pem.Block)
orGetConfigFoo(user string, block []byte)
.Let me know what are your thoughts :)
The text was updated successfully, but these errors were encountered: