All Projects → andesli → Gossh

andesli / Gossh

Licence: apache-2.0
gossh is an extremely concise ssh tool which developed by go language. It has only a binary program without any dependencies and is really ready to use out of the box. gossh is used Used to manage of linux (like unix) machines: including remote execution of commands and push and pull files, and support stand-alone and batch modes.

Programming Languages

go
31211 projects - #10 most used programming language

Labels

Projects that are alternatives of or similar to Gossh

Sish
HTTP(S)/WS(S)/TCP Tunnels to localhost using only SSH.
Stars: ✭ 2,087 (+1369.72%)
Mutual labels:  ssh
Sshdeploy
A command-line tool that enables quick build and run deployments over SSH.
Stars: ✭ 131 (-7.75%)
Mutual labels:  ssh
Cli
🧰 A zero trust swiss army knife for working with X509, OAuth, JWT, OATH OTP, etc.
Stars: ✭ 2,151 (+1414.79%)
Mutual labels:  ssh
Pssh
Parallel SSH Tools
Stars: ✭ 127 (-10.56%)
Mutual labels:  ssh
Connectbot
ConnectBot is the first SSH client for Android.
Stars: ✭ 1,763 (+1141.55%)
Mutual labels:  ssh
Adams
UNIX system administration in Common Lisp
Stars: ✭ 135 (-4.93%)
Mutual labels:  ssh
Tmux Cssh
ClusterSSH with tmux
Stars: ✭ 123 (-13.38%)
Mutual labels:  ssh
Dos ssh
Use BIOS ram hacks to make a SSH server out of any INT 10 13h app (MS-DOS is one of those)
Stars: ✭ 139 (-2.11%)
Mutual labels:  ssh
Ssh Tunnels
Visual examples and use cases for SSH tunnels
Stars: ✭ 130 (-8.45%)
Mutual labels:  ssh
Laravel Ssh Tunnel
Easy creation & maintenance of an SSH Tunnel for Laravel/Lumen
Stars: ✭ 134 (-5.63%)
Mutual labels:  ssh
Ssh Agent
Docker container for SSH agent forwarding on OSX/Linux
Stars: ✭ 128 (-9.86%)
Mutual labels:  ssh
Sshr
Proxy server for routing SSH connections
Stars: ✭ 129 (-9.15%)
Mutual labels:  ssh
Generate Ssh Configs
Automatically generate ssh config files for your cloud servers
Stars: ✭ 136 (-4.23%)
Mutual labels:  ssh
Awesome Ssh
💻 A curated list of SSH resources.
Stars: ✭ 1,742 (+1126.76%)
Mutual labels:  ssh
Alispot
自动创建阿里云抢占式实例,并启用网络加速
Stars: ✭ 139 (-2.11%)
Mutual labels:  ssh
Mainframer Intellij Plugin
An intellij idea plugin for mainframer project
Stars: ✭ 125 (-11.97%)
Mutual labels:  ssh
Question And Answer Sharing System
本系统是基于微信小程序的问答分享系统,采用微信小程序的形式进行开发,后端采用Java框架开发,用户可以在小程序中进行提问、回答、分享故事、评论、围观以及充值收益等操作,在围观的过程中,用户对于感兴趣的内容可进行打赏与点赞。 对于本系统中的提问与分享,提供免费与付费两种模式,将知识交互的便捷性和信息娱乐的共享性进行结合。
Stars: ✭ 135 (-4.93%)
Mutual labels:  ssh
Ssm Sh
Experiment to use SSM RunCommand instead of SSH
Stars: ✭ 140 (-1.41%)
Mutual labels:  ssh
Coco
Jumpserver ssh/ws server
Stars: ✭ 139 (-2.11%)
Mutual labels:  ssh
Sshtunnel
🚇 Ultra simple SSH tunnelling for Go programs.
Stars: ✭ 135 (-4.93%)
Mutual labels:  ssh

gossh

中文

1.What's gossh

gossh is an extremely concise ssh tool which developed by go language. It has only a binary program without any dependencies and is really ready to use out of the box. gossh is used Used to manage of linux (like unix) machines: including remote execution of commands and push and pull files, and support stand-alone and batch modes.

2.What can gossh do

Three core functions of gossh:

  1. Connect to the remote host to execute commands.
  2. Push local files or folders to remote hosts.
  3. Pull files from the remote host to the local.

功能

3.gossh operating mode

gossh supports stand-alone mode and batch parallel mode, that is, it can send commands to one machine at a time for execution, or batch commands to thousands of machines at a time. The batch parallel mode is also one of the biggest features of gossh, making full use of the advantages of the go language in concurrent execution. Stand-alone mode:
The stand-alone mode supports the three functions mentioned above: remotely execute commands, push files or directories, and pull files.

Batch mode:

The ip file can be specified by the -i parameter, and the concurrency can be specified by -c parameter. The batch parallel mode also supports the three functions mentioned above: remotely execute commands, push files or directories, and pull files.

Execution mode :concurrent and serial

  1. The batch mode is controlled by -c by default. If -c is set to 1, the default is serial execution mode, and the value of -c is greater than 1 is parallel execution mode.
  2. In parallel execution mode, a machine cannot be connected or execution fails and will not automatically exit. Serial mode is the same, but serial mode can make gossh exit immediately when an error occurs during execution through the -s parameter.

The reason why the error exit is not provided in the parallel mode is that it is difficult to stop the execution of the entire task immediately under the parallel execution. The serial mode is easier to control. In daily use, you can use the serial mode verification function first, and then turn on the parallel mode to improve effectiveness.

4.Getting started

4.1Install

1.Building from source

#To build gossh from the source code yourself you need to have a working Go environment with version 1.12 or greater installed.

cd $GOPATH/src && git clone https://github.com/andesli/gossh.git
cd gossh

//build gossh
go build ./cmd/gossh 

//build password encryption and decryption tool 
go build ./cmd/passtool


//Compile the programs for windows and linux os under the amd64 386 architecture, which  binarys is under the ./bin directory
./build.sh

2.Pre-compiled binary

bin
|-- 386
|   |-- linux
|   |   |-- gossh
|   |   `-- passtool
|   `-- windows
|       |-- gossh.exe
|       `-- passtool.exe
`-- amd64
    |-- linux
    |   |-- gossh
    |   `-- passtool
    `-- windows
        |-- gossh.exe
        `-- passtool.exe

dowload

4.2Usage

  • gossh
#gossh -h
flag needs an argument: -h
Usage of gossh:

  -t string
        running mode: cmd|push|pull (default "cmd")
        
  -h string
        ssh ip
        
  -P string
        ssh port (default "22")
        ssh端口

  -u string
        ssh user (default "root")
        ssh用户名

  -p string
        ssh password
        密码
        

  -i string
        ip file when batch running mode (default "ip.txt")

  -c int
        the number of concurrency when b (default 30)

  -s    if -s is setting, gossh will exit when error occurs
        
  -e    password is Encrypted 

  -key string
        aes key for password decrypt and encryption
        
  -f    force to run even if it is not safe

  -s    if -s is setting, gossh will exit when error occurs
        
  -l string
        log level (debug|info|warn|error (default "info")

  -logpath string
        logfile path (default "./log/")
        
  • passtool tool
./passtool -h
Usage of ./passtool:
  -d    Convert ciphertext to plaintext
  -e    Convert plaintext to ciphertext
  -key string
        AES key

4.3 Config file

The -i parameter is used to specify the batch operation host ip file. Each line of the file has 4 fields ip|port|user|password, separated by |. The four fields are: machine IP, ssh port, ssh user name, ssh password. The ip field is required, and the other three fields are optional. The following configurations are all legal.

ip|port|user|password
ip|port|user|
ip|port|user
ip|port|
ip|port
ip|
ip

If no optional fields are provided, gossh obtains the command line parameters through the -u, -p, -P parameters by default. If no command line parameters are specified, the default values of the command line parameters are taken by default. The default value of the current parameters of gossh:

-u root
-P 22
-p default empty 
-t cmd

Remark

  • If the password field is empty, gossh will find the relevant process from the db plugin by default, refer to 5.
  • If the password field is encrypted, you need to specify the -e flag. -e is an overall switch: the passwords in the password file are either all encrypted or not.

4.4 Example

exampledetail。

4.5 Log

logsdetail。

5.Password management

Password managementdetail。

6.Security

Safety managementdetail

8.Scenes

1.The first initialization of a large-scale machine.

The company came to hundreds of machines, only the ssh environment, except the initial user name and password, no other installation. At this time, use gossh to initialize the machine and establish a basic environment. (When gossh was originally written, it was to solve the environment initialization of Tencent pay DB thousands of machines).

2.Command-line batch remote management.

Not every company is a BAT and has established an automated operation and maintenance management system. The operation and maintenance personnel of the vast majority of small and medium-sized enterprises manage machines remotely through scripts. They urgently need an ssh tool that can be used without any dependency. Gossh is prepared for this kind of people. Gossh does not require any configuration files, does not have any dependencies, and is really ready to use.

9. FAQ

FAQ

Contact me for any questions[email protected]

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].