About
A Vert.x Shell provides a remotely accessible shell available via Telnet, SSH that provides a variety of commands for interacting live with Vert.x services
A Vert.x Shell can be provided via the deployment of:
- a Shell service (facade for starting a preconfigured shell either programmatically or as a Vert.x Service)
- or a Shell Server
- or Terminal servers (to write pure terminal applications)
Articles Related
Management
Service
Vert.x Shell can be started programmatically via:
- the ShellService
The configuration occurs in the ShellServiceOptions object.
when Vert.x Shell is already on your classpath you can use service:io.vertx.ext.shell instead or maven:io.vertx:vertx-shell:3.8.4
Telnet
With the vertx command line:
vertx run -conf '{"telnetOptions":{"port":5000}}' maven:io.vertx:vertx-shell:3.8.4
Ssh
- create a key pair for the SSH server
keytool -genkey -keyalg RSA -keystore ssh.jks -keysize 2048 -validity 1095 -dname CN=localhost -keypass secret -storepass secret
- create the auth config properties file
echo user.admin=password > auth.properties
- Create the configuration file
{
"sshOptions": {
"port": 4000,
"keyPairOptions": {
"path": "ssh.jks",
"password": "secret"
},
"authOptions": {
"provider": "shiro",
"config": {
"properties_path": "file:auth.properties"
}
}
}
}
- Start the shell with the vertx command line
vertx run -conf '$(cat conf.json)' maven:io.vertx:vertx-shell:3.8.4
Http
- create a certificate for the HTTP server
keytool -genkey -keyalg RSA -keystore keystore.jks -keysize 2048 -validity 1095 -dname CN=localhost -keypass secret -storepass secret
- create the auth config
echo user.admin=password > auth.properties
- create the http conf file
{
"httpOptions": {
"port": 8080,
"ssl": true,
"keyStoreOptions": {
"path": "keystore.jks",
"password": "secret"
},
"authOptions": {
"provider": "" shiro,
"config": {
"properties_path": "file:auth.properties"
}
}
}
}
- Run
vertx run -conf '$(cat conf.json)' maven:io.vertx:vertx-shell:3.8.4
Command
Command Extension
Vert.x Shell can be extended with custom commands in any language supported by Vert.x