Hi, i'm not sure if you can edit it in the key.pem file inside your directory, in my case i work on Othire 1.0, which is an older version and doesn't have the key.pem option. In the case your tfs is like Othire, then this would be the steps:
1. You can generate the rsa here:
VAPus - TFS RSA Generator (https://web.archive.org/web/20120423030928/http://vapus.net/generatersa)
2. You need to open otserv.ccp in the server sources and paste it there (Generally, p is prime1, q is prime2, d is privateExponent and modulus is client).
3. You need to open const.lua in otclient files and paste there the modulus too.
After it, you just need to re-compile both the server and the client and it should work fine.