基于Web的ssh控制台来执行命:KeyBox
基于Web的ssh控制台执行命令并同时管理多个系统。 KeyBox可以让你分享终端命令和文件上传到您的所有系统。一旦会话已经打开,您可以选择单个系统或任意组合来运行你的命令。可以添加额外的系统管理员并且它们的终端会话和历史可以进行审计。另外,KeyBox可以管理和分发已设置和定义的公共密钥。
Prerequisites
-
Java JDK 1.7 or greaterhttp://www.oracle.com/technetwork/java/javase/overview/index.html
-
Browser with Web Socket supporthttp://caniuse.com/websockets Note: In Safari if using a self-signed certificate you must import the certificate into your Keychain. Select 'Show Certificate' -> 'Always Trust' when prompted in Safari
-
Maven 3 or greater ( Only needed if building from source )http://maven.apache.org
-
Install FreeOTP or Google Authenticator to enable two-factor authentication with Android or iOS
FreeOTP | Link |
---|---|
Android | Google Play |
iOS | iTunes |
Google Authenticator | Link |
---|---|
Android | Google Play |
iOS | iTunes |
To Run Bundled with Jetty
If your not big on the idea of building from source...
Download keybox-jetty-vXX.XX.tar.gz
https://github.com/skavanagh/KeyBox/releases
Export environment variables
for Linux/Unix/OSX
export JAVA_HOME=/path/to/jdk export PATH=$JAVA_HOME/bin:$PATH
for Windows
set JAVA_HOME=C:\path\to\jdk set PATH=%JAVA_HOME%\bin;%PATH%
Start KeyBox
for Linux/Unix/OSX
./startKeyBox.sh
for Windows
startKeyBox.bat
How to Configure SSL in Jetty (it is a good idea to add or generate your own unique certificate)
http://wiki.eclipse.org/Jetty/Howto/Configure_SSL
To Build from Source
Export environment variables
export JAVA_HOME=/path/to/jdk export M2_HOME=/path/to/maven export PATH=$JAVA_HOME/bin:$M2_HOME/bin:$PATH
In the directory that contains the pom.xml run
mvn package jetty:run
**Note: Doing a mvn clean will delete the H2 DB and wipe out all the data.
Supplying a Custom SSH Key Pair
KeyBox generates its own public/private SSH key upon initial startup for use when registering systems. You can specify a custom SSH key pair in the KeyBoxConfig.properties file. This file is located in the jetty/keybox/WEB-INF/classes directory. (or the src/main/resources directory if building from source)
For example:
#set to true to regenerate and import SSH keys --set to true resetApplicationSSHKey=true #SSH Key Type 'dsa' or 'rsa' sshKeyType=rsa #private key --set pvt key privateKey=/Users/kavanagh/.ssh/id_rsa #public key --set pub key publicKey=/Users/kavanagh/.ssh/id_rsa.pub #default passphrase --leave blank if passphrase is empty defaultSSHPassphrase=myPa$$w0rd
Using KeyBox
Open browser to https://<whatever ip>:8443
Login with
username:admin password:changeme
Steps:
- Create systems
- Create profiles
- Assign systems to profile
- Assign profiles to users
- Users can login to create sessions on assigned systems
- Start a composite SSH session or create and execute a script across multiple sessions
- Add additional public keys to systems
- Audit session history