Update web.php
This commit is contained in:
parent
19ef66abd4
commit
881537c9c6
1 changed files with 15 additions and 7 deletions
|
@ -1,6 +1,7 @@
|
|||
<?php
|
||||
|
||||
use Illuminate\Support\Facades\Route;
|
||||
use phpseclib3\Net\SSH2;
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
|
@ -25,13 +26,20 @@ Route::get('/', function () {
|
|||
|
||||
Route::get('dev', function () {
|
||||
|
||||
$create = new \App\Models\PhyreServer();
|
||||
$create->name = 'hetzner1';
|
||||
$create->ip = '37.27.28.220';
|
||||
$create->port = '22';
|
||||
$create->username = 'root';
|
||||
$create->password = 'WTuiMuxqpdMLWv3b3Nxv';
|
||||
$create->save();
|
||||
$phyreServer = \App\Models\PhyreServer::find(15);
|
||||
|
||||
$ssh = new SSH2($phyreServer->ip);
|
||||
if ($ssh->login($phyreServer->username, $phyreServer->password)) {
|
||||
dd($ssh->exec('cat phyre-install.log'));
|
||||
}
|
||||
|
||||
// $create = new \App\Models\PhyreServer();
|
||||
// $create->name = 'hetzner1';
|
||||
// $create->ip = 'random-ip';
|
||||
// $create->port = '22';
|
||||
// $create->username = 'root';
|
||||
// $create->password = 'random-pass';
|
||||
// $create->save();
|
||||
|
||||
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue