Giter Site home page Giter Site logo

multissh's People

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  avatar  avatar  avatar  avatar  avatar  avatar

multissh's Issues

加密交换算法不支持

<ssh: handshake failed: ssh: no common algorithm for key exchange; client offered: [[email protected] ecdh-sha2-nistp256 ecdh-sha2-nistp384 ecdh-sha2-nistp521 diffie-hellman-group14-sha1], server offered: [diffie-hellman-group1-sha1 diffie-hellman-group-exchange-sha1]>

Enhancement: better testing progress

@freedomkk-qfeng 在修复 #20 的过程中,我有一些新的想法:

目前的测试把 ip 和端口硬编码在开源代码中,是一种不太安全的实践。理论上应该由用户手动填写一个本地数据文件。

还有我通过阅读 ssh.go 这个包的源码发现,google 内部的单元测试是编写了一个模拟 ssh server 的对象来测试的。我觉得也可以借用这种**去设计更好的测试流程。

https://cs.opensource.google/go/x/crypto/+/master:ssh/test/test_unix_test.go;l=300-301;drc=776e461a4e6d8b372a43c72122c5c28cfc40dca2

关于真机测试,还可以采用 ssh -T [email protected] 这种方式来验证远程连接的有效性,因为大多数人从GitHub克隆项目一般都已经配置了GitHub上的公钥。参考: https://docs.github.com/zh/authentication/connecting-to-github-with-ssh/testing-your-ssh-connection

multissh.exe在连接cisco nexus系列交换机遇到问题

具体遇到如下问题,希望大大修复

multissh版本0.3.0

nexus交换机型号
cisco Nexus9000 C93180YC-FX

nexus交换机版本
Software
BIOS: version 05.39
NXOS: version 7.0(3)I7(8)
BIOS compile time: 08/30/2019
NXOS image file is: bootflash:///nxos.7.0.3.I7.8.bin
NXOS compile time: 3/3/2020 20:00:00 [03/04/2020 12:49:49]


multissh.exe -hosts "192.168.1.1" -u "user123" -p "password123" -cmds "terminal length 0;show run"

2022/01/19 14:48:40 Multissh start
2022/01/19 14:48:40 Multissh finished. Process time 294.2006ms. Number of active ip is 1
host: 172.26.252.247
========= Result =========
<ssh: handshake failed: ssh: no common algorithm for key exchange; client offered: [diffie-hellman-group-exchange-sha1 diffie-hellman-group1-sha1 diffie-hellman-group-exchange-sha256], server offered: [diffie-hellman-group14-sha1 ecdh-sha2-nistp256 ecdh-sha2-nistp384]>

multissh无法在ruckus icx 交换机使用

ktbyers/netmiko#495

具体情况跟上述连接。

原因是icx交换机配置了RADIUS authentication的话,输入enable后会要求输入帐号和密码,但是使用multissh失败

multissh.exe -hosts xxx.xxx.xxx.xxx -u username -p password -cmds "enable;username;password;show run"
2021/09/10 12:01:59 Multissh start
2021/09/10 12:02:30 Multissh finished. Process time 30.2485087s. Number of active ip is 1
host: xxx.xxx.xxx.xxx
========= Result =========
SSH run timeout:30 second.

虽然不知你有没有条件调试,但还是希望能修正multissh,由衷感谢。

免密登录执行问题

你好,请问这个工具目前能实现免密操作功能吗?虽然可以使用密钥,但台量大不太好管理,大多数母机都是从管理节点执行的,希望后面可以实现。多谢了

在WS-C4506-E上使用multissh执行“show environment”失败

我使用windows版本的multissh

multissh.exe -hosts xxx.xxx.xxx.xxx -u username -p password -cmds "terminal length 0;show environment"
2021/09/10 12:01:59 Multissh start
2021/09/10 12:02:30 Multissh finished. Process time 30.2485087s. Number of active ip is 1
host: xxx.xxx.xxx.xxx
========= Result =========
SSH run timeout:30 second.

如下是putty正常ssh执行
`VSS#show environment

Executing the command on VSS member switch role = VSS Active, id = 1

no temperature alarms

Module Sensor Temperature Status
------+--------------------------+--------------------+------------
1 Air inlet 21C (50C,66C,72C) ok
1 Air outlet 37C (73C,80C,92C) ok
1 XPP 67C (101C,120C,123C) ok
1 IFE 35C (65C,90C,120C) ok
1 CONAN 38C (67C,82C,100C) ok
1 CPU 36C (69C,102C,105C) ok
2 Air inlet 22C (56C,68C,71C) ok
2 Air inlet remote 20C (46C,59C,62C) ok
2 Air outlet 25C (66C,76C,79C) ok
2 Air outlet remote 25C (60C,71C,74C) ok
3 Air inlet 22C (56C,68C,71C) ok
3 Air inlet remote 20C (46C,59C,62C) ok
3 Air outlet 25C (66C,76C,79C) ok
3 Air outlet remote 25C (60C,71C,74C) ok

Power Fan Inline
Supply Model No Type Status Sensor Status


PS1 PWR-C45-2800AC AC 2800W good good good
PS2 PWR-C45-2800AC AC 2800W good good good

Power supplies needed by system : 1
Power supplies currently available : 2

Chassis Type : WS-C4506-E

Power consumed by backplane : 0 Watts

Switch Bandwidth Utilization : 0%

Supervisor Led Color : Green

Module 1 Status Led Color : Green
Module 2 Status Led Color : Green PoE Led Color : Green
Module 3 Status Led Color : Green PoE Led Color : Green

Beacon Led Status : off

Fantray : Good
Fantray removal timeout : 240

Power consumed by Fantray : 120 Watts

Executing the command on VSS member switch role = VSS Standby, id = 2

no temperature alarms

Module Sensor Temperature Status
------+--------------------------+--------------------+------------
11 Air inlet 23C (50C,66C,72C) ok
11 Air outlet 40C (73C,80C,92C) ok
11 XPP 69C (101C,120C,123C) ok
11 IFE 35C (65C,90C,120C) ok
11 CONAN 41C (67C,82C,100C) ok
11 CPU 39C (69C,102C,105C) ok
12 Air inlet 24C (56C,68C,71C) ok
12 Air inlet remote 22C (46C,59C,62C) ok
12 Air outlet 27C (66C,76C,79C) ok
12 Air outlet remote 27C (60C,71C,74C) ok
13 Air inlet 23C (56C,68C,71C) ok
13 Air inlet remote 21C (46C,59C,62C) ok
13 Air outlet 26C (66C,76C,79C) ok
13 Air outlet remote 26C (60C,71C,74C) ok

Power Fan Inline
Supply Model No Type Status Sensor Status


PS1 PWR-C45-2800AC AC 2800W good good good
PS2 PWR-C45-2800AC AC 2800W good good good

Power supplies needed by system : 1
Power supplies currently available : 2

Chassis Type : WS-C4506-E

Power consumed by backplane : 0 Watts

Switch Bandwidth Utilization : 0%

Supervisor Led Color : Green

Module 11 Status Led Color : Green
Module 12 Status Led Color : Green PoE Led Color : Green
Module 13 Status Led Color : Green PoE Led Color : Green

Beacon Led Status : off

Fantray : Good
Fantray removal timeout : 240

Power consumed by Fantray : 120 Watts`

Bug: not enough arguments in call to `connect`

func Test_SSH_run(t *testing.T) {
var cipherList []string
session, err := connect(username, password, ip, key, port, cipherList)

⚠️ not enough arguments in call to connect
have (string, string, string, string, number, []string)
want (string, string, string, string, int, []string, []string)

在上述代码中 connect 函数没有足够的函数参数。

关于多个空格的命令执行报错的问题

multissh 在执行时,cmds中存在多个空格就会抛出超时错误。
例如
➜ multissh ./main -hostfile host.txt -u root -p nsfocus2018 -cmds "top -n 1"
2019/01/08 10:28:04 Multissh start
2019/01/08 10:28:34 Multissh finished. Process time 30.001343414s. Number of active ip is 1
host: 172.19.252.217
========= Result =========
SSH run timeout:30 second.

“SSH run timeout:30 second.” that‘s why?

That's why retrun “SSH run timeout:30 second.”?

./multissh -cmds "cd /home;ls;exit" -hosts "192.168.182.65" -u root -p clouds                          
2019/06/27 20:32:56 Multissh start
2019/06/27 20:33:26 Multissh finished. Process time 30.000306562s. Number of active ip is 1
host:  192.168.182.65
========= Result =========
SSH run timeout:30 second.

ping is ok.

ping 192.168.182.65
PING 192.168.182.65 (192.168.182.65) 56(84) bytes of data.
64 bytes from 192.168.182.65: icmp_seq=1 ttl=64 time=0.111 ms
64 bytes from 192.168.182.65: icmp_seq=2 ttl=64 time=0.127 ms
64 bytes from 192.168.182.65: icmp_seq=3 ttl=64 time=0.083 ms

ssh [email protected] is ok.
what's wrong with me And what can I do?

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.