Tuesday, July 29, 2008

Remote access to the server

Recently, I just learn how to remotely access to the server that located at Jaring data center. This could save time to go over there to do some minor thing such like restart services or apache.

I use an SSH server for Windows called something like WinSSHD, or something like that. Then I SSH in to the server using the Free software called as Putty.exe SSH client. In fact we can use Putty to set up tunnels for tunneling RDP and VNC through it. Then I SSH into the server and use the command line:

httpd -k restart

-or for previous version 2.2.x
apache -k restart

To restart the httpd service, in order to refresh the setting, i edited at php.ini
We can also kill apache with kill apache.exe or kill httpd.exe

We use sambar server for the mail server. It allows you to set up some rules that for example when an email with an exact line of text is placed in the body and/or subject line and is sent to a certain email address, it executes a script. Some .bat files need to be created to executed based on the rules in order to run the program smoothly, it is safe because someone would have to KNOW what the email address was, what the exact text was to execute these bat files. Further, you can lock these down with other rules such as the origin of the email, it must be from a certain sender.

Combine that with excellent spam and spoofing controls in sambar, it is a safe way to remotely restart my server, for example, by simply sending an email.

Beside these, you could shut the server down, bring it back online, what ever you like this way. But that being said, SSH is very secure.

No comments: