102 lines
5.3 KiB
Markdown
102 lines
5.3 KiB
Markdown
```sh
|
|
█▀▀ █▀█ █▀▀ █▀█ █▀▀ █░█ ▄▀█ █▀▄
|
|
█▄█ █▄█ █▄█ █▄█ █▄▄ █▀█ █▀█ █▄▀
|
|
⣿⣿⣿⣿⣿⣿⣿⣿⡿⠿⠛⠛⠛⠋⠉⠈⠉⠉⠉⠉⠛⠻⢿⣿⣿⣿⣿⣿⣿⣿
|
|
⣿⣿⣿⣿⣿⡿⠋⠁⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠉⠛⢿⣿⣿⣿⣿
|
|
⣿⣿⣿⣿⡏⣀⠀⠀⠀⠀⠀⠀⠀⣀⣤⣤⣤⣄⡀⠀⠀⠀⠀⠀⠀⠀⠙⢿⣿⣿
|
|
⣿⣿⣿⢏⣴⣿⣷⠀⠀⠀⠀⠀⢾⣿⣿⣿⣿⣿⣿⡆⠀⠀⠀⠀⠀⠀⠀⠈⣿⣿
|
|
⣿⣿⣟⣾⣿⡟⠁⠀⠀⠀⠀⠀⢀⣾⣿⣿⣿⣿⣿⣷⢢⠀⠀⠀⠀⠀⠀⠀⢸⣿
|
|
⣿⣿⣿⣿⣟⠀⡴⠄⠀⠀⠀⠀⠀⠀⠙⠻⣿⣿⣿⣿⣷⣄⠀⠀⠀⠀⠀⠀⠀⣿
|
|
⣿⣿⣿⠟⠻⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠶⢴⣿⣿⣿⣿⣿⣧⠀⠀⠀⠀⠀⠀⣿
|
|
⣿⣁⡀⠀⠀⢰⢠⣦⠀⠀⠀⠀⠀⠀⠀⠀⢀⣼⣿⣿⣿⣿⣿⡄⠀⣴⣶⣿⡄⣿
|
|
⣿⡋⠀⠀⠀⠎⢸⣿⡆⠀⠀⠀⠀⠀⠀⣴⣿⣿⣿⣿⣿⣿⣿⠗⢘⣿⣟⠛⠿⣼
|
|
⣿⣿⠋⢀⡌⢰⣿⡿⢿⡀⠀⠀⠀⠀⠀⠙⠿⣿⣿⣿⣿⣿⡇⠀⢸⣿⣿⣧⢀⣼
|
|
⣿⣿⣷⢻⠄⠘⠛⠋⠛⠃⠀⠀⠀⠀⠀⢿⣧⠈⠉⠙⠛⠋⠀⠀⠀⣿⣿⣿⣿⣿
|
|
⣿⣿⣧⠀⠈⢸⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠟⠀⠀⠀⠀⢀⢃⠀⠀⢸⣿⣿⣿⣿
|
|
⣿⣿⡿⠀⠴⢗⣠⣤⣴⡶⠶⠖⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣀⡸⠀⣿⣿⣿⣿
|
|
⣿⣿⣿⡀⢠⣾⣿⠏⠀⠠⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠛⠉⠀⣿⣿⣿⣿
|
|
⣿⣿⣿⣧⠈⢹⡇⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣰⣿⣿⣿⣿
|
|
⣿⣿⣿⣿⡄⠈⠃⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣠⣴⣾⣿⣿⣿⣿⣿
|
|
⣿⣿⣿⣿⣧⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣠⣾⣿⣿⣿⣿⣿⣿⣿⣿⣿
|
|
⣿⣿⣿⣿⣷⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣴⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿
|
|
⣿⣿⣿⣿⣿⣦⣄⣀⣀⣀⣀⠀⠀⠀⠀⠘⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿
|
|
⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣷⡄⠀⠀⠀⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿
|
|
⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣧⠀⠀⠀⠙⣿⣿⡟⢻⣿⣿⣿⣿⣿⣿⣿⣿⣿
|
|
⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⠇⠀⠁⠀⠀⠹⣿⠃⠀⣿⣿⣿⣿⣿⣿⣿⣿⣿
|
|
⣿⣿⣿⣿⣿⣿⣿⣿⡿⠛⣿⣿⠀⠀⠀⠀⠀⠀⠀⠀⢐⣿⣿⣿⣿⣿⣿⣿⣿⣿
|
|
⣿⣿⣿⣿⠿⠛⠉⠉⠁⠀⢻⣿⡇⠀⠀⠀⠀⠀⠀⢀⠈⣿⣿⡿⠉⠛⠛⠛⠉⠉
|
|
⣿⡿⠋⠁⠀⠀⢀⣀⣠⡴⣸⣿⣇⡄⠀⠀⠀⠀⢀⡿⠄⠙⠛⠀⣀⣠⣤⣤⠄ # gogoCHAD by MOIS3Y
|
|
```
|
|
# Companion script for Quick access to a server with VM/DCImanager 6 installed
|
|
|
|
Allows you to quickly and in one line access the server using the generated platform administrator key.
|
|
- Safe
|
|
- Reliable
|
|
- No hassle
|
|
|
|
## Features
|
|
|
|
- It finds a guaranteed administrator himself
|
|
- Generates a link for authorization
|
|
- Container is very small based on Alpine Linux
|
|
- Once accessed, container and image will be deleted
|
|
- There is error handling if access cannot be obtained
|
|
|
|
## Run with gogoCHAD:
|
|
- Get instructions and generate a key pair to access the GO server.
|
|
- Fill in the parameters in the configuration section
|
|
- Give a name to the companion script like gogo
|
|
- Give the script permission to execute chmod 754 gogo attributes should be [-rwxr-xr--]
|
|
- Place the script in a directory that is on the path of the $PATH environment variable (echo $PATH)
|
|
The paths are separated by the symbol : you can put here for example /usr/local/bin/gogo
|
|
- Restart terminal
|
|
|
|
## The syntax to connect is:
|
|
```sh
|
|
gogo --vm host.domain.zone 22
|
|
gogo --dci host.domain.zone 2222
|
|
gogo --bill host.domain.zone 22
|
|
gogo --vm 8.8.8.8 220122
|
|
gogo --dns 8.8.8.8 # (without specifying a port, the default port 22 will be used)
|
|
```
|
|
|
|
|
|
|
|
|
|
## Info:
|
|
Environment variables are used as input to the container:
|
|
| ENV | VM6 | DCI6 |
|
|
| ------ | ------ |------ |
|
|
| PLATFORM | vm |dci |
|
|
| CLIENT_HOST |ip |ip |
|
|
|
|
To obtain the VM/DCImanager access key, a container is downloaded to the client server,
|
|
which connects to the platform stack makes a query to the database receives a list of 10
|
|
finds the first guaranteed admin among them
|
|
most likely it will be id 2 or 3.
|
|
The container then makes a request to get the key
|
|
passing admin id or email via internal authentication api.
|
|
|
|
After the container has completed and returns the output with access, it will automatically be deleted.
|
|
The command sent by this script also includes a command that will remove the image from
|
|
client server, so access leaves no trace on the server.
|
|
In addition, the container reads config.json with read-only permissions, while querying the database and
|
|
obtaining a key does not affect the operation of the platform and does not make changes.
|
|
|
|
Access to panels of the 5th generation remains the same if the client server listens only on port 443
|
|
will have to remove it from the link.
|
|
When the container is updated, you will need to replace the version tag in the configuration: 0.0.x
|
|
|
|
|
|
|
|
|
|
### Known issues:
|
|
|
|
- Sometimes the key for DCI/VMmanager 6 may work,
|
|
therefore, this problem is solved by connecting by cookies.
|
|
- If the client did not provide a port or access is denied, the access script will not work,
|
|
you need to find out the correct port and ask to remove the firewall restrictions.
|
|
Moreover, if these are panels of the 5th generation, you will receive an access link, but it will not work as expected
|
|
this is due to the fact that the link is generated before the request to the client server.
|
|
|