简体   繁体   English

如何通过互联网加密和解密数据?

[英]How to encrypt and decrypt data over the internet?

I have a C# Application which connects to mongodb. 我有一个连接到mongodb的C#应用​​程序。 The database is on a different server. 该数据库位于其他服务器上。 I have to access it over internet. 我必须通过互联网访问它。 How can I encrypt and decrypt the data? 如何加密和解密数据?

Use SSH tunnels or a VPN. 使用SSH隧道或VPN。

ssh -f user@remote_server -L 27017:localhost:27017 -N

  • The -f tells ssh to go into the background just before it executes the command. -f告诉ssh在执行命令之前进入后台。
  • This is followed by the username and server you are logging into. 其次是您要登录的用户名和服务器。
  • The -L 27017:personal-server.com:27017 is in the form of -L local-port:host:remote-port. -L 27017:personal-server.com:27017的格式为-L local-port:host:remote-port。
  • Finally the -N instructs OpenSSH to not execute a command on the remote system. 最后,-N指示OpenSSH不在远程系统上执行命令。

source 资源

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM