https://github.com/fdefelici/shellst
Execute shell command on your server as REST service.
https://github.com/fdefelici/shellst
java rest shell
Last synced: about 2 months ago
JSON representation
Execute shell command on your server as REST service.
- Host: GitHub
- URL: https://github.com/fdefelici/shellst
- Owner: fdefelici
- Created: 2018-09-21T21:48:20.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2019-01-27T19:07:17.000Z (over 7 years ago)
- Last Synced: 2024-12-30T21:17:46.938Z (over 1 year ago)
- Topics: java, rest, shell
- Language: Java
- Homepage:
- Size: 14.6 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 7
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# SHELLST [](https://travis-ci.org/fdefelici/shellst)
Shellst allow you to access your server shell by rest api. Useful in case you can't access remotly your server by ssh.
Both Windows (cmd) and Unix (sh) shell are supported.
# Running shellst
> java [OPTIONS] -jar shellst-\.jar
Available options:
* *-Dport*: Specify listening port (default: 4567)
* *-Dtoken*: Specify a token to access api (default: not set)
NOTE: Options can be passed also as environment variables
# API
## HELO
To check if application is working
Curl Example:
> curl "http://localhost:4567/"
## EXEC SHELL COMMAND
Run a shell command on the host machine (like ssh command)
Curl Example:
> curl -X POST "http://localhost:4567/shell/exec" --data-urlencode "cmd=mkdir /tmp/mydir"
## COPY
Run a copy file from client to server. (like scp command)
Curl Example:
> curl "http://localhost:4567/shell/copy" -F "file=@local/file/path/myfile.example" -F "path=/dest/path/filename.example"
NOTE: like scp destination path must exists