Better host completion for ssh in Zsh.
Make sure you have fzf installed.
zinit light sunlei/zsh-ssh
antigen bundle sunlei/zsh-ssh
-
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.
-
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.
Just press Tab after ssh
command as usual.
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