Skip to content
forked from poneding/ssher-rs

ssher 是一款连接远程服务器命令行工具,简单易用。

License

Notifications You must be signed in to change notification settings

Caisin/ssher-rs

 
 

Repository files navigation

ssher

English | 简体中文

ssher is an easy-to-use command line tool for connecting to remote servers.

demo

Installation

  • Install with cargo install
cargo install ssher
  • Install from binary

For MacOS or Linux:

curl -sSL https://github.com/poneding/ssher-rs/raw/master/install.sh | sh

For Windows:

Download the lastest executable from Releases and add it to the PATH.

Usage

usage

  1. Select a server and connect
ssher
ssher -s <server>
  1. Add a server
ssher add
  1. Remove servers
# remove, rm
ssher rm
ssher rm <server_a> <server_b>
  1. List servers
# list, ls
ssher ls
  1. Rename a server
ssher rename
ssher rename <server_a>
  1. Edit a server
ssher edit
ssher edit <server>
  1. Check version
# version, v
ssher v
  1. Help
ssher help

Completions

# bash
source <(ssher completion bash)
source <(COMPLETE=bash ssher)

# zsh
source <(ssher completion zsh)
source <(COMPLETE=bash zsh)

# fish
ssher completion fish | source
source (COMPLETE=fish ssher | psub)

# powershell
ssher completion powershell > ssher.ps1
. .\ssher.ps1
$env:COMPLETE = "powershell"
ssher | Out-String | Invoke-Expression

You can add the command to your shell's profile e.g. ~/.bashrc or ~/.zshrc to enable completions for each session.

Configuration

The configuration file is saved in the ~/.ssher.yaml file.

Troubleshooting

  1. MacOS default bash version is too low, you may occur the following error when using completions source <(COMPLETE=bash ssher):
$ source <(COMPLETE=bash ssher)
error: Broken pipe (os error 32)

Solutions:

  • Use the following command to upgrade bash:
brew install bash
  • Generate completions to a file and source it:
COMPLETE=bash ssher > .ssher_bash_completion.sh
source .ssher_bash_completion.sh

About

ssher 是一款连接远程服务器命令行工具,简单易用。

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Rust 95.1%
  • Shell 4.1%
  • Makefile 0.8%