doraemon

module
v0.0.3-alpha Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 17, 2021 License: GPL-3.0

README

Just Like Doraemon, Give Me All Tools I Need ~

install from code

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

install from go get

GO111MODULE=on go get -u github.com/lpxxn/doraemon/cmd/doraemon

help

doraemon -h

Features

  • SSH server management
  • Run custom command

SSH Server management

run doraemon
doraemon ssh

config

The configuration file is in directory ~/.doraemon,the configuration file will be created when the program is run for the first time.

password

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"

publickey

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

proxy

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"

run command after login service

you can use startCommand run 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"
  

custom command

run doraemon cmd doraemon cmd

manage commonly used command

[[cmdInfo]]
  name = "cd_test"
  cmd = """ 
  cd /; pwd; ls -al;
  """
  desc = "test command"

you can run doraemon cmd

Directories

Path Synopsis
cmd
test

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL