Awesome
zsh-ssh
Better host completion for ssh in Zsh.
Installation
Make sure you have fzf installed.
Zinit
zinit light sunlei/zsh-ssh
Antigen
antigen bundle sunlei/zsh-ssh
Oh My Zsh
-
Clone this repository into
$ZSH_CUSTOM/plugins
(by default~/.oh-my-zsh/custom/plugins
)git clone https://github.com/sunlei/zsh-ssh ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-ssh
-
Add the plugin to the list of plugins for Oh My Zsh to load (inside
~/.zshrc
):plugins=(zsh-ssh $plugins)
-
Start a new terminal session.
Sheldon
-
Add this config to
~/.config/sheldon/plugins.toml
[plugins.zsh-ssh] github = 'sunlei/zsh-ssh'
-
Run
sheldon lock
to install the plugin. -
Start a new terminal session.
Manual (Git Clone)
-
Clone this repository somewhere on your machine. For example:
~/.zsh/zsh-ssh
.git clone https://github.com/sunlei/zsh-ssh ~/.zsh/zsh-ssh
-
Add the following to your
.zshrc
:source ~/.zsh/zsh-ssh/zsh-ssh.zsh
-
Start a new terminal session.
Usage
Just press <kbd>Tab</kbd> after ssh
command as usual.
SSH Config Example
You can use #_Desc
to set description.
~/.ssh/config
Host Bastion-Host
Hostname 1.1.1.1
User sunlei
Host Development-Host
Hostname 2.2.2.2
IdentityFile ~/.ssh/development-host
#_Desc For Development