GithubHelp home page GithubHelp logo

gossh's Introduction

gossh

This slim script is forked from https://github.com/robinparisi/ssh-manager.

But added more functions:

  • support sepcific identity_file.
  • support upload/push file to server with scp.
  • support download/pull file from server with scp.
  • support execute remote command from server.
  • remove server alive checker, because it cause some latency.

screenshot

Installation

$ mkdir -p $HOME/bin
$ cd $HOME/bin
$ curl https://raw.githubusercontent.com/yftzeng/gossh/main/gossh -o gossh
$ chmod +x gossh
$ hash -r
$ gossh

File database is named ".gossh".

Usage

$ gossh add local:root:localhost:22
new alias 'local:root:localhost:22' added

$ gossh add gcos:ant:blog.gcos.me:22:.ssh/id_rsa
new alias 'gcos:ant:blog.gcos.me:22' added

$ gossh
List of availables servers for user ant
==============================================
local	  => root@localhost		  -> 22
gcos	  => [email protected]	  -> 22	  with .ssh/id_rsa

Availables commands
==============================================
/home/ant/bin/gossh cc		<alias> [username]				connect to server
/home/ant/bin/gossh add		<alias>:<user>:<host>:[port]:[identity_file]	add new server
/home/ant/bin/gossh del		<alias>						delete server
/home/ant/bin/gossh push	<alias>						upload file to server
/home/ant/bin/gossh pull	<alias>						download file from server
/home/ant/bin/gossh cmd		<alias>						run command on server
/home/ant/bin/gossh exp								export config

Connect to server
$ gossh cc gcos

Push file to server
$ gossh push gcos bin/gossh

Pull file from server
$ gossh pull gcos gossh

Run command on remote server
$ gossh cmd gocs ls

De-installation / Remove

$ rm -f $HOME/bin/gossh
$ rm -f $HOME/.gossh

gossh's People

Contributors

yftzeng avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.