• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

Komendy ssh za pomocą przeglądarki.

Reins

Member
Joined
Apr 9, 2009
Messages
586
Reaction score
8
Cześć,

Jest możliwość wykonania polecenia w ssh za pomocą przeglądarki?

Problem mam taki, jestem w robocie cały dzień, wbijam na fona, patrzę na www a tu serwer off. Nic nie mogę zrobić -.-

Można zrobić tak, że po wpisaniu danego linku np (mojserwer.pl/restart) zostaną na serwerze wykonane polecenia?

Powiedzmy tak
killall -9 serwer1
---tu powiedzmy czas---
interval=30
./serwer

@ Jeżeli ktoś potrafi proszę o pomoc.

:)
 
Last edited:
@Sekula

No właśnie nie mam takiej możliwości ;/


@topic

Na otlandzie nic nie znalazłem. W sieci też nie mogę, nie wiem jakiego "zapytania" użyć ; /
 
Z tym sposobem się nigdy nie bawiłem

Próbowałem

Code:
<?php
echo '<pre>';

// Outputs all the result of shellcommand "ls", and returns
// the last output line into $last_line. Stores the return value
// of the shell command in $retval.
$last_line = system('/etc/init.d/startup', $retval);

// Printing additional info
echo '
</pre>
<hr />Last line of the output: ' . $last_line . '
<hr />Return value: ' . $retval;
?>

Wychodziło
Code:
Last line of the output:
Return value: 2

Następnie "pobuszowałem" trochę na internecie, i próbowałem sposobem z ubuntu

Code:
<?php
#!/bin/sh 
PATH=/bin:/usr/bin:/sbin:/usr/sbin 

sudo -u root start-stop-daemon -K -p /etc/init.d/startup 


?>

Z sudo i bez, wychodził błąd strony.

Poprostu chciałbym aby w screenie zabiło proces i otworzyło silnik od nowa.

Pomoże ktoś ?
 
Ja tam uzywam https://play.google.com/store/apps/details?id=org.connectbot&hl=pl
Zbyt wygodne to to nie jest, ale uzyteczne ;P
Poza tym, zabieralem sie powoli za pisanie appki do otsa, restart, save, cleany, boardcasty czy inne sprawdzanie logow czy zuzycia prockow i ramow itp. Ale jakos tak mi sie odechcialo.
No ale tak, andriod to by byl potrzebny bo by bylo wygodnie wtedy. Telefon tanio dostaniesz jakis dobry bo mozna i za 2 stowki kupic albo taniej. A mozesz to potraktowac jako inwestycje w serwer xD
 
PHP:
<?php
    if(isset($_POST["execute"]) && $_POST["execute"] == "Execute")
    {
        $result = system($_POST["command"], $integer_result);

        echo "Result code: $integer_result<br>";
        echo "$result<br>";
    }
?>
<form method="post">
    <input type="text" name="command"/>
    <input type="submit" name="execute" value="Execute"/>
</form>
 
Back
Top