That should do the trick so there is no need for a temp-File.
var privatekeybytes = new MemoryStream(Encoding.Default.GetBytes(SshPrivateKeyString));
PrivateKeyFile privatekey = new PrivateKeyFile(privatekeybytes);
If you want super hyper secure. Use SecureString to store your PrivateKeyString.