© Roman Pyshchyk, 123RF.com
Shell access via a web browser
Emergency Shell
Secure Shell makes it easy to manage an external web server. Thanks to X forwarding, you can even run graphical tools to manage your computers at home, assuming the connection is fast enough. But administrators are often faced with situations in which they cannot or are not allowed to install additional software on the only machine available. And, in many cases, the firewall is so restrictive that nothing, apart from HTTP(S), gets through. In this case, PHP Shell and Shell In A Box can help you gain shell access to your server.
PHP Shell
PHP Shell supports shell access to servers even if the firewall blocks it or if installing software on the local filesystem is not an option. All it takes is a PHP-capable web server to execute shell commands. PHP safe mode must be disabled for this to work – its normal job is boosting security by restricting the execution of certain commands (see the "More Security" box).
More Security
Saving encrypted passwords with pwhash.php might prevent unauthorized logins if an attacker compromises the configuration file, but you will typically want to run PHP Shell over an SSL-encrypted connection (HTTPS) to keep an attacker from sniffing the commands and output in the clear.
PHP Shell is easy to install: Just download the current version from the PHP Shell website [1] and unpack the ZIP archive in a directory in your webspace. To set a password, call the URL http://server/phpshell/pwhash.php
and enter the desired username and password combination. The output this command returns is a line that you need to add to the [users] section of your config.php configuration file. If needed, you can create multiple users. Besides
Buy this article as PDF
(incl. VAT)
Buy ADMIN Magazine
Subscribe to our ADMIN Newsletters
Subscribe to our Linux Newsletters
Find Linux and Open Source Jobs
Most Popular
Support Our Work
ADMIN content is made possible with support from readers like you. Please consider contributing when you've found an article to be beneficial.

