Kommander
A simple web-based SSH client. It supports:
- entering SSH login details (including private key and custom ports) and connecting
- user authentication (and 2FA!)
- saving configurations to access them from anywhere
Install
Simply clone the repository:
Kommander depends on Python v3.10!
Configuration
Nginx
Kommander is reliant on Nginx so you must setup a configuration file or edit an existing one to server Kommander. Use the following as a template:
server {
root /usr/share/nginx/html;
server_name _;
listen [::]:80;
listen 80;
# /STATIC IS NECESSARY
location /static {
expires -1;
alias /usr/share/nginx/html/static;
}
# /SOCKET.IO IS NECESSARY
location /socket.io {
# choose whatever port you need - run.sh needs to run on the same port
proxy_pass http://localhost:9000;
}
location / {
# choose whatever port you need - run.sh needs to run on the same port
proxy_pass http://localhost:8000;
}
}
kommander/settings.py
You must fill out the CSRF_TRUSTED_ORIGINS
list in kommander/settings.py
with your domain(s). An example of this is commented out in the same file.
SMTP
Django has support for password reset emails. To use this feature, you must fill in the details of an email account in kommander/email_config.json
. Additionally, you must also change init_sites.py
and replace kommander.planetwaffle.net
with your own production domain and dev.planetwaffle.net
with your own development domain. These can be http://localhost
.
Superuser Account
You must also change the environment variables in run.sh
for python3.10 manage.py createsuperuser --no-input
to your preference to set the Django administrator account. You need to supply an email and a password.
Usage
Simply run the run.sh
bash script. It takes the following parameters:
-i
: installs dependencies from thepackage-lock.json
andrequirements.txt
.
It acceptsyes
orno
.
-m
: whether or not to enable developer mode. This will setkommander.settings.DEBUG
to True, which is not appropriate for production, as well as define which site to use ininit_sites.py
. Anything that isn'tdev
will be assumed to run in production mode.
-p
: the port that the Django server should run on.
-a
: the port that the SSH gateway server should run on.
-s
: whether or not to enable silent mode. This will disable all requests for input. Anything that isn'tyes
will be treated asno
.
Menshen
Menshen is the underlying server that powers Kommander. It is the service that acts as a gateway (hence the name 'Menshen', after the Chinese divine guardians of doors and gates) between the user and the remote server.
Contributing
Contributions are welcome! If you find any issues, improvements or would like a feature added, feel free to submit an issue or a pull request. Please keep in mind, however, that Kommander is a simple web-based SSH client. I feel that v1.0.0 successfully meets all the criteria for a simple SSH client and therefore, am unlikely to add any new features. I will be happy to review any pull requests though.
License
Kommander and Menshen fall under the MIT license.