GithubHelp home page GithubHelp logo

mmh's Introduction

mmh's People

Contributors

dependabot-preview[bot] avatar dependabot[bot] avatar fitzix avatar mritd avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

mmh's Issues

安装go mod的依赖出现问题

你好
通过 go mod download 发现版本无法找到呢
go: finding github.com/mritd/readline v0.0.0-20180425151209-ae245b60ddeb
go: github.com/mritd/[email protected]: unknown revision ae245b60ddeb
go: error loading module requirements

请问支持这个参数吗PubkeyAcceptedKeyTypes=+ssh-dss

目前运维要求在~/.ssh/config
这样的才能连接上跳板机器

Host xxx
HostName xxx
User username
Port 3223
IdentityFile  ~/.ssh/id_dsa
PubkeyAcceptedKeyTypes=+ssh-dss

我看了一下 只有一行 PubkeyAcceptedKeyTypes=+ssh-dss 不太一样

[Feature] server ping

功能: 通过无限跳板能力实现 ping 最终目标主机
场景: 通过多级跳板机链接目标主机(A=>B=>C=>D),重启 D 主机,需要实时检测 D 主机是否已经重启完成;此时需要自动在 C 主机上发起 ping 命令

可以实现类似 ssh -D 的功能吗?

@mritd 你好,mmh 真的很好用,感谢进行分享。可以让 mmh 实现类似 ssh -D 的功能吗?有时候一些地址只能在内网中进行访问,如果 mmh 能打一个隧道就更爽了

能不能加个参数不执行sort.Sort(css)这行代码

func getServers() Servers {
	var servers Servers
	bss := setDefaultValue(basicConfig.Servers, basicConfig.Basic)
	sort.Sort(bss)
	servers = append(servers, bss...)
	if currentConfig.configPath != basicConfig.configPath {
		css := setDefaultValue(currentConfig.Servers, currentConfig.Basic)
                 // 看这里👀
		//sort.Sort(css)
		servers = append(servers, css...)
	}
	return servers
}

Dependabot can't resolve your Go dependency files

Dependabot can't resolve your Go dependency files.

As a result, Dependabot couldn't update your dependencies.

The error Dependabot encountered was:

github.com/mritd/mmh/pkg/cmd: cannot find module providing package github.com/mritd/mmh/pkg/cmd

If you think the above is an error on Dependabot's side please don't hesitate to get in touch - we'll do whatever we can to fix it.

View the update logs.

[Feature]添加公共配置项

相关背景

刚刚使用了一下这个工具,发现非常好用。

但是。。

我在设置配置文件的时候,感觉设置 privatekey, privatekey_password 这些配置项很麻烦,因为我的私钥基本上使用的都是同一个。一个相同的配置要加4 5 遍,以后如果要改也麻烦。

具体实现

所以请问是否考虑在配置文件中添加一个公共配置项,例如下面这样的:

maxproxy: 5
basic:
- privatekey: ""
- privatekey_password: ""
servers:
- name:xxx
  tags:
  - test
  user: addxxx
  password: ""
  privatekey: /Users/michaeltsui/.ssh/id_rsa
  privatekey_password: ""
  address: xxx
  port: 22
  proxy: ""
- name: balrog2
  tags:
  - test
  user: xxx
  password: ""
  privatekey: /Users/michaeltsui/.ssh/id_rsa
  privatekey_password: ""
  address: addxxx
  port: 22
  proxy: ""
tags:
- test

server的每个配置项都可以在basic中配置,系统查找配置的时候,优先查server中对应 name 的,如果查不到再去查basic的。

愿意贡献力量

如果 repo 主觉得这个feature可以接受的话,我就准备看一下代码,看能不能自己实现了提一个PR过来。

Dependabot can't resolve your Go dependency files

Dependabot can't resolve your Go dependency files.

As a result, Dependabot couldn't update your dependencies.

The error Dependabot encountered was:

github.com/mritd/mmh/pkg/cmd: cannot find module providing package github.com/mritd/mmh/pkg/cmd

If you think the above is an error on Dependabot's side please don't hesitate to get in touch - we'll do whatever we can to fix it.

View the update logs.

max_proxy 影响 tun 模式下 TCP 隧道

在 issue #15 commit 0ae6774 中增加了跳板模式的 tcp tunnel 能力;由此产生了对于 "无限跳板" 安全边界判断的一个 bug:

默认情况下最大跳板机数量(max_proxy)为 5,为了防止用户写错配置文件从而导致循环链接的情况;此种限止在 tcp tunnel 模式下不适用,因为max_proxy 存储在同一个实例中,多个 tcp 链接打开会不断增加此数值直到触发警界值;目前解决方案:

1、增加一个标志位,在 tcp tunnel 模式下忽略安全警界值(max_proxy),不过有安全风险
2、将 max_proxy 关联当前 goroutine id,不过对 tcp 链接性能有影响

堡垒机登陆

您好!
首先必须先吹捧一下,工具真的好用,比配置ssh config方便多了。
最近在使用过程中发现,登陆堡垒机貌似不能用,具体如下:
1、配置堡垒机的登陆账户密码等
2、登陆,由于需要双向认证,输入接收到的短信验证码后才能继续
3、登陆报错:
😱 ssh: handshake failed: ssh: unable to authenticate, attempted methods [none], no supported methods remain

ssh: handshake failed: ssh error

ssh: handshake failed: ssh: unable to authenticate, attempted methods [none publickey], no supported methods remain

My default.yaml

basic:
  password: ""
  port: 22
  private_key: /home/jinh/.ssh/id_rsa
  private_key_password: ""
  proxy: pbserver
  user: jinh
max_proxy: 5

servers:
- name: imau
  address: 172.25.4.21
  tags: ["imau"]

- name: node3
  address: 20.1.1.13
  user: jinh
  private_key: /home/jinh/.ssh/id_rsa
  tags: ["node3"]
  proxy: pbserver

- name: node4
  address: 20.1.1.14
  tags: ["node4"]
  private_key: /home/jinh/.ssh/id_rsa

- name: pbserver
  address: 20.1.1.10
  tags: ["pbserver"]
  private_key: /home/jinh/.ssh/id_rsa

Thank you in advance.

隧道配置问题

可不可以在配置文件增加端口映射的列表,连接ssh的时候自动转发

tmux window title 自动更改

目前 tmux 下执行 mmh 后,默认 window 标题全部为 mmh,考虑让 mmh 自动设置 tmux 标题内容,比如设置成 server name,方便区分

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.