Giter VIP home page Giter VIP logo

tssh's Introduction

tssh

golang 实现的ssh 工具

安装

下载安装

下载地址 release

windows用户请手动下载,暂时不提供一键安装模式(主要是批处理脚本不会写

Mac一键安装

/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/luanruisong/tssh/master/install.sh)"

homebrew 安装

对不起,我不配

我不配

设置环境变量

    export TSSH_HOME=/Users/user/work/ssh_config/

查看帮助

$ tssh -h

 ______   ______     ______     __  __
/\__  _\ /\  ___\   /\  ___\   /\ \_\ \
\/_/\ \/ \ \___  \  \ \___  \  \ \  __ \
   \ \_\  \/\_____\  \/\_____\  \ \_\ \_\
    \/_/   \/_____/   \/_____/   \/_/\/_/


Usage of TSSH:

  env		get env info 				(e|-e)
  version	get version info			(v|-v)
  list 		get config list				(l|-l)
  conn		connect to alias			(c|-c)
  delete 	del config by alias			(d|-d)
  add 		add config {user@host}			(a|-a)
  save 		reset config {user@host}		(s|-s)
	  -P int
			set port in (add|save) (default 22)
	  -k string
			set private_key path in (add|save)
	  -n string
			set alias name in (add|save)
	  -p string
			set password in (add|save)

相关操作

添加一个链接配置

采用密钥模式

$ tssh -a user@host -k /Users/user/.ssh/id_rsa -n name

采用密码模式

密码如含有特殊字符请使用单引号

$ tssh -a user@host -p 123456 -n pname

覆盖一个链接配置

$ tssh -s user@host -k /Users/user/.ssh/id_rsa -n name
$ tssh -s user@host -p 123456 -n pname

查看现有链接

$ tssh -l
No              name                ip      user               auth_mode      port                 save_at
 1              name              host      user             private_key        22     2021-03-30 18:38:28
 2             pname              host      user                password        22     2021-03-30 18:38:37

删除配置

$ tssh -d name
$ tssh -d pname

链接

tssh -c name

windows 实测

在windows下代码会出现 panic

panic

已修复windows 问题,感谢大佬提供了一个 终端跨平台解决方案

大佬项目链接 containerd/console

解决问题的心路历程 -> anwu's blog

tssh's People

Contributors

luanruisong avatar

Watchers

James Cloos 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.