SSH is Secure Shell Protokol, which is commonly used to manage terminal servers. Of course, through some cleverly twisted place, you can configure the connection via SSH, but this is most likely not what you need. SSH may be more useful for managing the MySQL server, although it can be used for encryption, but it is difficult ... It is easier to use SSL to encrypt traffic. To do this, you will need to configure the MySQL server itself in the appropriate way. Here is the instruction.
If all of you decided to raise SSH, then the easiest way to do this is to use Linux, where to install the MySQL server. In Linux SSH, this is his soul, you can say. Here is the instruction for the simplest (in my opinion) distribution.
It depends on where you are going to access your SSH server. If from a local network, it is not needed; if via the Internet, it is needed.
But in fact all this does not solve your problems. You want to interact with the database, the passwords from which you want to "hardcore". This is not PHP and your program code, as well as passwords, without some skills, students will not open. To do this, they at least have to learn what a decompiler is and how to use it.
But still the question is interesting, but how can you protect yourself from such problems? In my opinion, one of the easiest ways to protect this is to record connection data in App.config (or Web.config, if it's a web project) and encrypt this data. Here is an example of how to encrypt App.config , and here is the official instruction from Microsoft, on protecting Connection Strings in web projects.
You can also google on obfuscation code. There is a list of obfuscators for .NET. Another disadvantage is that the program code swells at times. For example, I wrote a test program:
namespace ConsoleApplication1 { using System; public class Program { private static void Main(string[] args) { var Login = "admin"; var Passwort = "Password"; var test = Login + ":" + Passwort; Console.WriteLine(test); Console.ReadLine(); } } }
The compiled program "weighs" 5kb. Having passed it through the confuserEx obfuscator with the configured constant encryption, I received 53kb. The decompiler could no longer open this file at all.
With some settings, the file grew to 46kb and the code was changed beyond recognition ... In the decompiled program, I could no longer find the constants specified in the code.
For decompiling, I used dotPeek from JetBrains. But the obfuscator project file:
<project outputDir="C:\Dev\Test\ConsoleApplication1\bin\Obfuscated" baseDir="C:\Dev\Test\ConsoleApplication1\bin\Release" xmlns="http://confuser.codeplex.com"> <rule pattern="true" preset="maximum" inherit="false"> <protection id="constants" /> </rule> <module path="ConsoleApplication1.exe" /> </project>