Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updated xterm and ratchet to latest version #14

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
39 changes: 20 additions & 19 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,45 +3,46 @@ https://github.com/roke22/Laravel-ssh-client

![](https://raw.githubusercontent.com/roke22/PHP-SSH2-Web-Client/master/demo.gif)

## PHP SSH2 Cliente Web
# PHP SSH2 Cliente Web

Cliente Web SSH2 en PHP que usa websockets para conectar a otros servidores por SSH con el cliente web.

Necesitas tener activadas libssh2 instalado en el servidor y hospedarlo en un servidor linux, puedes comprobar libssh2 con "phpinfo()" mas informacion en http://php.net/manual/en/book.ssh2.php

## INSTALACION
## Instalación

1. Instala libssh2. Si tienes plesk puedes seguir este manual https://support.plesk.com/hc/en-us/articles/213930085-How-to-install-SSH2-extension-for-PHP-
2. Instala xterm con "npm install" o en el directorio principal ejecuta "npm install xterm"
3. En el directorio "server" instala ratchet (http://socketo.me/) con composer, ejecuta en el directorio "server" el comando "composer install"
4. Arranca el websocket que esta en la carpeta "server/bin", puedes hacerlo con el comando "php server/bin/websocket.php 2>&1 >/dev/null &" desde el directorio principal
5. Modifica la url del websocket en el fichero index.html, linea 81
6. Ahora puedes cargar la web
2. Copia el contenido del directorio `server` al directorio raiz de tu servidor web, y cambia tu directorio activo a ese.
3. Instala xterm y sus addons con `npm install`.
4. Instala ratchet con `composer install`.
5. Arranca el websocket que esta en el directorio `server/bin`, puedes hacerlo con el comando `php server/bin/websocket.php 2>&1 >/dev/null &` desde el directorio principal.
6. Modifica la url del websocket en el fichero `index.html`, linea 81. Por defecto, apunta a `localhost:8080`.
7. Ahora puedes cargar la web en http://localhost.

NOTA: Puedes cambiar el tamaño de la consola modificando las constantes ROWS y COLS en Servidorsocket.php pero tambien debes modificarlos en el index.html, en caso de ser diferente no dibujara correctamente la informacion en la terminal web.
NOTA: Puedes cambiar el tamaño de la consola modificando las constantes ROWS y COLS en `server/src/Servidorsocket.php` pero tambien debes modificarlos en `server/index.html`, en caso de ser diferente no dibujara correctamente la informacion en la terminal web.

## LICENCIA
## Licencia

Cliente Web SSH2 esta bajo la licencia MIT, mas informacion en https://opensource.org/licenses/mit-license.php


## PHP SSH2 Web Client
# PHP SSH2 Web Client

SSH2 Web Client that use php and websockets to connect to a SSH server by a webclient.

You need to have libssh2 installed in your server and host the project on a linux server, you can check libssh2 with a "phpinfo()" more info at http://php.net/manual/en/book.ssh2.php

## INSTALLATION
## Installation

1. Install libssh2. If you have Plesk Panel follow this manual https://support.plesk.com/hc/en-us/articles/213930085-How-to-install-SSH2-extension-for-PHP-
2. Install xterm with npm with "npm install" or on the root folder execute "npm install xterm"
3. On the "server" folder install ratchet (http://socketo.me/) with composer, execute on the "server" folder "composer install"
4. Run the websocket that is in the "server/bin" folder, you can do it with the commando "php server/bin/websocket.php 2>&1 >/dev/null &" from the root folder.
5. Modify the url of the websocket in the index.html file, line 81
6. Now you can load the url of the domain.
2. Copy the `server` directory contents to your webserver root, and change your current directory to that.
3. Install xterm.js and addons using `npm install`.
4. Install ratchet using `composer install`.
5. Run the websocket that is in the `server/bin` directory. For reference, you can use the command `php server/bin/websocket.php 2>&1 >/dev/null &` from the root folder.
6. Modify the url of the websocket in the `index.html` file, line 81.
7. Now you can load the website on http://localhost.

NOTE: You can change the size of the terminal modifying the constants ROWS and COLS in Servidorsocket.php but you have to do in index.html too. Must be the same size in both files or the web terminal will draw the information in a bad way.
NOTE: You can change the size of the terminal modifying the constants ROWS and COLS in `server/src/Servidorsocket.php` but you have to do in `server/index.html` too. Must be the same size in both files or the web terminal will draw the information in a bad way.

## LICENSE
## License

SSH2 Web Client is under MIT license, more info at https://opensource.org/licenses/mit-license.php
19 changes: 0 additions & 19 deletions package.json

This file was deleted.

2 changes: 2 additions & 0 deletions server/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
node_modules/**
vendor/**
4 changes: 2 additions & 2 deletions server/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@
}
},
"require": {
"cboden/ratchet": "^0.4.1"
"cboden/ratchet": "^0.4.3"
}
}
}