mkdir -p $GOPATH/src/github.com/lpxxn/doraemon
cd $GOPATH/src/github.com/lpxxn/doraemon
git clone https://github.com/lpxxn/doraemon.git
cd cmd/doraemon
export GO111MODULE=on
make install
GO111MODULE=on go get -u github.com/lpxxn/doraemon/cmd/doraemon
doraemon -h
- SSH server management
- Simple http service for sharing files
- Run custom command
The configuration file is in directory ~/.doraemon,the configuration file will be created when the program is run for
the first time.
you can run doraemon, type openConfigDir open the configuration directory
connection to the server by username and password.
[[sshInfo]]
name = "pwdservr"
authMethod = "password"
uri = "127.0.0.1:222"
user = "testuser"
passphrase = "123"
desc = "sandbox deploy server"
if your ssh server connection uses publickey
[[sshInfo]]
name = "sandbox1"
authMethod = "publickey"
uri = "123.13.63.203:22"
user = "abc"
publicKeyPath = "/Users/abc/.ssh/a.pem"
desc = "my sandbox host1"
if your publickey is encrypted, use passphrase to specify the ciphertext
[[sshInfo]]
name = "gateway"
authMethod = "publickey"
uri = "123.13.63.203:22"
user = "abc"
passphrase = "dsafDFl209Dfoifqw"
publicKeyPath = "/Users/abc/.ssh/test.pem"
desc = "gateway jumper
if there is a proxy service, you must first configure the proxy server, other configurations use proxySSHName to
specify the proxy server
[[sshInfo]]
name = "proxy"
authMethod = "publickey"
uri = "192.168.1.7:22"
user = "lipeng"
publicKeyPath = "/Users/abc/.ssh/my_test.pem"
desc = "proxy"
[[sshInfo]]
name = "my_sandbox1"
authMethod = "publickey"
uri = "192.2.0.8:22"
user = "lipeng"
publicKeyPath = "/Users/li/.ssh/test.pem"
proxySSHName = "proxy"
desc = "my sandbox host 1"
you can use startCommand to run custom command after login service
[[sshInfo]]
name = "sandbox1"
authMethod = "publickey"
uri = "123.13.63.203:22"
user = "abc"
publicKeyPath = "/Users/abc/.ssh/a.pem"
desc = "my sandbox host1"
startCommand = "cd /home/abc/app/"
[[sshInfo]]
name = "sandbox1"
authMethod = "publickey"
uri = "123.13.63.203:22"
user = "abc"
publicKeyPath = "/Users/abc/.ssh/a.pem"
desc = "my sandbox host1"
startCommand = "tmux attach -t abc"
Share folder via http service
doraemon srv .
manage commonly used command
[[cmdInfo]]
name = "cd_test"
cmd = """
cd /; pwd; ls -al;
"""
desc = "test command"
you can run doraemon cmd