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

how to connect with private key content, without file path #48

Open
tareksalem opened this issue Mar 12, 2023 · 0 comments
Open

how to connect with private key content, without file path #48

tareksalem opened this issue Mar 12, 2023 · 0 comments

Comments

@tareksalem
Copy link

Thanks for this awesome library,
I have a problem currently with the connection with private key,

I have a private key with an actual content exist int the memory "the private key is not stored on the file system"
as the following:

-----BEGIN RSA PRIVATE KEY-----
key content
-----END RSA PRIVATE KEY-----

how can I use that private key to connect to the server, because it doesn't work with the following:

	authKey, _ := goph.Key(serverData.SshPrivateKey, "")
	fmt.Sprintf("------------- my dd %", authKey)
	goph.Key()
	client, err := goph.New(serverData.SshRootUsername, DEFAULT_SERVER_IP, authKey)
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