6 releases
new 0.3.2 | Feb 13, 2025 |
---|---|
0.3.1 | Feb 10, 2025 |
0.2.0 | Feb 9, 2025 |
0.1.1 | Jul 18, 2024 |
#96 in Command-line interface
396 downloads per month
33KB
856 lines
ssher
English | 简体中文
ssher is an easy-to-use command line tool for connecting to remote servers.
Installation
cargo install ssher
Usage
- Select a server and connect
ssher
ssher -s <server>
- Add a server
ssher add
- Remove servers
# remove, rm
ssher rm
ssher rm <server_a> <server_b>
- List servers
# list, ls
ssher ls
- Rename a server
ssher rename
ssher rename <server_a>
- Edit a server
ssher edit
ssher edit <server>
- Check version
# version, v
ssher v
- 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
- 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
Dependencies
~18–28MB
~442K SLoC