I guess, every hosting account comes with a personalized cgi-bin directories, where you can run and upload CGI or Perl scripts. Also web host have the rights to disable scripts that may be putting a stress on the server resources. According, to my knowledge Shell, Perl, Python, Bash, TCL, and bourne scripts are supporting CGI.
Usually web host compile PHP with mcrypt, which support to provide high powered encryption through PHP and it is very idealistic for storing confidential information in MySQL. In addition, you can access the server through SSH instead of telnet.
You should avoid telnet, because of security reason. You may connect to the server by using SSH, which is an encrypted protocol as similar to telnet. Usually SSH is disabled by default and can be enabled on request.