All Projects → xwjdsh → Manssh

xwjdsh / Manssh

Licence: mit
Manage your ssh alias configs easily.

Programming Languages

go
31211 projects - #10 most used programming language
golang
3204 projects

Projects that are alternatives of or similar to Manssh

Sultan
Sultan: Command and Rule over your Shell
Stars: ✭ 625 (+176.55%)
Mutual labels:  command-line, ssh
Hss
An interactive parallel ssh client featuring autocomplete and asynchronous execution.
Stars: ✭ 248 (+9.73%)
Mutual labels:  command-line, ssh
Poet
Lets you split your ssh_config into separate files
Stars: ✭ 72 (-68.14%)
Mutual labels:  command-line, ssh
Linux Command
Linux命令大全搜索工具,内容包含Linux命令手册、详解、学习、搜集。https://git.io/linux
Stars: ✭ 17,481 (+7634.96%)
Mutual labels:  command-line, ssh
Mac
macOS Mojave v. 10.14 setup for developers.
Stars: ✭ 209 (-7.52%)
Mutual labels:  command-line, ssh
Nvidia Htop
A tool for enriching the output of nvidia-smi.
Stars: ✭ 213 (-5.75%)
Mutual labels:  command-line
Pdd
📅 Tiny date, time diff calculator with piggybacked timers
Stars: ✭ 218 (-3.54%)
Mutual labels:  command-line
Brutedum
BruteDum - Brute Force attacks SSH, FTP, Telnet, PostgreSQL, RDP, VNC with Hydra, Medusa and Ncrack
Stars: ✭ 212 (-6.19%)
Mutual labels:  ssh
Cdist
usable configuration management
Stars: ✭ 210 (-7.08%)
Mutual labels:  ssh
Gitlab Cli
Create a merge request from command line in gitlab
Stars: ✭ 224 (-0.88%)
Mutual labels:  command-line
Klog
A plain-text file format and command line tool for time tracking
Stars: ✭ 222 (-1.77%)
Mutual labels:  command-line
Webpack Command
[DEPRECATED] Lightweight, modular, and opinionated webpack CLI that provides a superior experience
Stars: ✭ 218 (-3.54%)
Mutual labels:  command-line
Joal
An open source command line RatioMaster with an optional WebUI.
Stars: ✭ 213 (-5.75%)
Mutual labels:  command-line
Hcl
Command-line tool for manipulating Harvest timesheets
Stars: ✭ 219 (-3.1%)
Mutual labels:  command-line
Dry Cli
General purpose Command Line Interface (CLI) framework for Ruby
Stars: ✭ 210 (-7.08%)
Mutual labels:  command-line
Hfish
安全、可靠、简单、免费的企业级蜜罐
Stars: ✭ 2,977 (+1217.26%)
Mutual labels:  ssh
Ronor
Sonos smart speaker controller API and command-line tools
Stars: ✭ 212 (-6.19%)
Mutual labels:  command-line
Bv
Quickly view satellite imagery, hyperspectral imagery, and machine learning image outputs directly in your iTerm2 terminal.
Stars: ✭ 215 (-4.87%)
Mutual labels:  command-line
Keymaker
Lightweight SSH key management on AWS EC2
Stars: ✭ 221 (-2.21%)
Mutual labels:  ssh
Notica
Send browser notifications from your terminal. No installation. No registration.
Stars: ✭ 215 (-4.87%)
Mutual labels:  command-line

manssh

Release Build Status Go Report Card GoCover.io GoDoc DUB

manssh is a command line tool for managing your ssh alias config easily, inspired by storm project, powered by Go.

Note:
This project is actually a simple glue project, the most complex and core parsing ssh config file logic implements by ssh_config, I didn't do much.
At first it was just a imitation of storm, now it has become a little different.

Feature

Install

Gopher

go get -u github.com/xwjdsh/manssh/cmd/manssh

Homebrew

brew tap xwjdsh/tap
brew install xwjdsh/tap/manssh

Docker

alias manssh='docker run -t --rm -v ~/.ssh/config:/root/.ssh/config wendellsun/manssh'

Manual

Download it from releases, and extract it to your PATH directory.

Usage

% manssh
NAME:
   manssh - Manage your ssh alias configs easily

USAGE:
   manssh [global options] command [command options] [arguments...]

VERSION:
   master

COMMANDS:
     add, a     Add a new SSH alias record
     list, l    List or query SSH alias records
     update, u  Update SSH record by specifying alias name
     delete, d  Delete SSH records by specifying alias names
     backup, b  Backup SSH config files
     help, h    Shows a list of commands or help for one command

GLOBAL OPTIONS:
   --file value, -f value  (default: "/Users/wendell/.ssh/config")
   --help, -h              show help
   --version, -v           print the version

Add a new alias

# manssh add test2 2.2.2.2
# manssh add test1 [email protected]:77 -c IdentityFile=~/.ssh/wendell
% manssh add test1 [email protected]:77 -i ~/.ssh/wendell
✔ alias[test1] added successfully.

        test1 -> [email protected]:77
                identityfile = /Users/wendell/.ssh/wendell

Username and port config is optional, the username is current login username and port is 22 by default.
Using -c to set more config options. For convenience, -i xxx can instead of -c identityfile=xxx.

List or query alias

# manssh list
# manssh list "*"
# manssh list Test -ic
% manssh list test1 77
✔ Listing 1 records.

        test1 -> [email protected]:77
                identityfile = /Users/wendell/.ssh/wendell

It will display all alias records If no params offered, or it will using params as keywords query alias records.
If there is a -it option, it will ignore case when searching.

Update an alias

# manssh update test1 -r test2
# manssh update test1 [email protected]1.1.1:22022
% manssh update test1 -i "" -r test3 -c hostname=3.3.3.3 -c port=22022
✔ alias[test3] updated successfully.

        test3 -> [email protected]:22022

Update an existing alias record, it will replace origin user, hostname, port config's if connected string param offered.
You can use -c to update single and extra config option, -c identityfile= -c proxycommand= will remove identityfile and proxycommand options.
For convenience, -i xxx can instead of -c identityfile=xxx
Rename the alias specified by -r flag.

Delete one or more alias

# manssh delete test1
% manssh delete test1 test2
✔ alias[test1,test2] deleted successfully.

Backup ssh config

% manssh backup ./config_backup
✔ backup ssh config to [./config_backup] successfully.

For Include directive

If you use the Include directive, there are some extra notes.

Add -p(--path) flag for list,add,update,delete command to show the file path where the alias is located, it can also be set by the MANSSH_SHOW_PATH environment variable.

MANSSH_SHOW_PATH

Set to true to show the file path where the alias is located. Default is false.


Add -ap(--addpath) flag for add command to specify the file path to which the alias is added, it can also be set by the MANSSH_ADD_PATH environment variable.

MANSSH_ADD_PATH

This file path indicates to which file to add the alias. Default is the entry config file.


For convenience, you can export these environments in your .zshrc or .bashrc, example:

export MANSSH_SHOW_PATH=true
export MANSSH_ADD_PATH=~/.ssh/config.d/temp

Thanks

Licence

MIT License

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].