Introduction About Site Map

XML
RSS 2 Feed RSS 2 Feed
Navigation

Main Page | Blog Index

Monday, September 12th, 2005, 6:12 am

cPanel Terminal Hack

Cron jobWhen I first set up this site, which is administered using cPanel, I was blocked access to a terminal (AKA shell, console, command-line) and denied telnet/SSH access by the Web host. By default, most hosts do likewise, depriving site owners from excessive flexibility in hope that security will not be jeopardised and sites will rarely ‘break’. Nonethess, I found a terminal workaround, which I would like to share.

Run command as a cron job (widget/icon shown above). Have it scheduled to run a minute later with output to get sent by E-mail (default option) or saved to a file, e.g.

du -all >~/output_file

output_file, which gets created in your home directory, should then contain text that otherwise will have appeared in a terminal. Likewise, virtually anything including installations can be carried out. System administrators would become distressed if this practice became commonplace. In essence, this is the same as having a terminal-based interface, albeit it is slower and unresponsive.

Cron jobs in cPanel

Example cron job in cPanel – periodic mySQL backups (click image for full-sized equivalent)

One Response to “cPanel Terminal Hack”

  1. Amit Gupta Says:

    that’s a pretty cool trick!! ;)

Back to top

Retrieval statistics: 21 queries taking a total of 0.145 seconds • Please report low bandwidth using the feedback form
Original styles created by Ian Main (all acknowledgements) • PHP scripts and styles later modified by Roy Schestowitz • Help yourself to a GPL'd copy
|— Proudly powered by W o r d P r e s s — based on a heavily-hacked version 1.2.1 (Mingus) installation —|