Skip to main content
Topic: Using SSH on shared host to check connection? (Read 1880 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Using SSH on shared host to check connection?

Hey, I have small issue and maybe you can help me with it.

Some users from Netherlands are telling me that my forum is not available for them, all the see is white page.
I have SSH on my shared host, and my question is - can I use it somehow to check if server can ping (or something like that) to users computer?

Re: Using SSH on shared host to check connection?

Reply #1

I would think a white page is a server error ... like a misconfiguration in an .htaccess file if you are using Apache.  There should be some log in your access or error file that would show why things are failing.

If you are really on sharred hosting, then to my knowledge, you will be in a jailed (chrooted) ssh, which means you will have a very limited set of commands available to you inside that SSH.


Re: Using SSH on shared host to check connection?

Reply #2

You could always toss together some curl stuff in PHP. A quick search gives this example.

Code: [Select]
    $url = 'yoururl';
    $ch = curl_init($url);
    curl_setopt($ch, CURLOPT_NOBODY, true);
    curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);
    curl_exec($ch);
    $retcode = curl_getinfo($ch, CURLINFO_HTTP_CODE);
    curl_close($ch);
    if (200==$retcode) {
        // All's well
    } else {
        // not so much
    }