Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/yinheli/sshw
🐝 ssh client wrapper for automatic login
https://github.com/yinheli/sshw
autologin cli-utilities ssh ssh-client
Last synced: about 7 hours ago
JSON representation
🐝 ssh client wrapper for automatic login
- Host: GitHub
- URL: https://github.com/yinheli/sshw
- Owner: yinheli
- License: mit
- Created: 2018-07-21T09:28:21.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2024-07-08T15:04:58.000Z (6 months ago)
- Last Synced: 2024-12-14T07:00:23.500Z (7 days ago)
- Topics: autologin, cli-utilities, ssh, ssh-client
- Language: Go
- Homepage:
- Size: 2.52 MB
- Stars: 792
- Watchers: 20
- Forks: 93
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-ops - yinheli/sshw - 07-21|2024-07-08 | 一款实现了类似 jumpserver 登陆界面的终端 SSH 工具 | (堡垒机)
README
# sshw
![GitHub](https://img.shields.io/github/license/yinheli/sshw) ![GitHub tag (latest by date)](https://img.shields.io/github/v/tag/yinheli/sshw)
ssh client wrapper for automatic login.
![usage](./assets/sshw-demo.gif)
## install
use `go get`
```
go install github.com/yinheli/sshw/cmd/sshw@latest
```or download binary from [releases](//github.com/yinheli/sshw/releases).
## config
config file load in following order:
- `~/.sshw`
- `~/.sshw.yml`
- `~/.sshw.yaml`
- `./.sshw`
- `./.sshw.yml`
- `./.sshw.yaml`config example:
```yaml
- { name: dev server fully configured, user: appuser, host: 192.168.8.35, port: 22, password: 123456 }
- { name: dev server with key path, user: appuser, host: 192.168.8.35, port: 22, keypath: /root/.ssh/id_rsa }
- { name: dev server with passphrase key, user: appuser, host: 192.168.8.35, port: 22, keypath: /root/.ssh/id_rsa, passphrase: abcdefghijklmn}
- { name: dev server without port, user: appuser, host: 192.168.8.35 }
- { name: dev server without user, host: 192.168.8.35 }
- { name: dev server without password, host: 192.168.8.35 }
- { name: ⚡️ server with emoji name, host: 192.168.8.35 }
- { name: server with alias, alias: dev, host: 192.168.8.35 }
- name: server with jump
user: appuser
host: 192.168.8.35
port: 22
password: 123456
jump:
- user: appuser
host: 192.168.8.36
port: 2222# server group 1
- name: server group 1
children:
- { name: server 1, user: root, host: 192.168.1.2 }
- { name: server 2, user: root, host: 192.168.1.3 }
- { name: server 3, user: root, host: 192.168.1.4 }# server group 2
- name: server group 2
children:
- { name: server 1, user: root, host: 192.168.2.2 }
- { name: server 2, user: root, host: 192.168.3.3 }
- { name: server 3, user: root, host: 192.168.4.4 }
```# callback
```yaml
- name: dev server fully configured
user: appuser
host: 192.168.8.35
port: 22
password: 123456
callback-shells:
- { cmd: 2 }
- { delay: 1500, cmd: 0 }
- { cmd: "echo 1" }
```