免密登录
- 客户端生成公钥、私钥
ssh-keygen
- 复制公钥到服务器
cat ~/.ssh/id_rsa.pub
- 服务器生成
~/.ssh/authorized_keys
文件并粘贴客户端公钥
ssh localhost vim ~/.ssh/authorized_keys
退出重新登录服务器测试
# 高亮插件 zsh-syntax-highlighting git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting # 自动补全 zsh-autosuggestions git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions # 配置插件 vim ~/.zshrc # 找到 plugins = () 填入 plugins=(其他的插件 zsh-syntax-highlighting zsh-autosuggestions) # 使生效 . ~/.zshrc