Просмотр исходного кода

remove omz's ssh-agent support, add ssh-agent forwarding to ssh config

Problem: we use the same dotfiles on all servers. ssh-agent forwarding does not
work well if ssh-agent exists, because in forwarding sshd acts as the agent.

To avoid this, we're removing ssh-agent setup from dotfiles, because it's not
necessary anyway - we'll rely on OS X and Ubuntu and Pagent's (windows, PuTTY
complement) built in prompts to have the identity added.

Most servers are already prepped to accept ssh-agent forwarding, so the real
magic that gives us forwarding is our `.ssh/config` file. Just put `ForwardAgent
yes` on any machines that you want to forward identities to.

Try to avoid placing `ForwardAgent` in the config's global settings.
Weiyi Lou 13 лет назад
Родитель
Сommit
f185e6587e
3 измененных файлов с 11 добавлено и 12 удалено
  1. 10 6
      ssh/config
  2. 0 5
      zsh/omz-custom/ssh-agent.zsh
  3. 1 1
      zsh/zshrc

+ 10 - 6
ssh/config

@@ -3,16 +3,20 @@
 #alias orinocos='ssh weiyi@orinoco-stage'
 
 Host ursa
-User cinaeco
+  User cinaeco
+  ForwardAgent yes
 
 Host fornax
-User administrator
+  User administrator
 
 Host parsleygardens.net
-User cinaeco
+  User cinaeco
+
+Host dev5
+  ForwardAgent yes
 
 ## Keep alive for all hosts
 Host *
-User root
-ServerAliveCountMax 4
-ServerAliveInterval 15
+  User root
+  ServerAliveCountMax 4
+  ServerAliveInterval 15

+ 0 - 5
zsh/omz-custom/ssh-agent.zsh

@@ -1,5 +0,0 @@
-#############
-# SSH AGENT #
-#############
-
-zstyle :omz:plugins:ssh-agent agent-forwarding on

+ 1 - 1
zsh/zshrc

@@ -30,7 +30,7 @@ DISABLE_AUTO_TITLE="true"
 # Which plugins would you like to load? (plugins can be found in ~/.oh-my-zsh/plugins/*)
 # Custom plugins may be added to ~/.oh-my-zsh/custom/plugins/
 # Example format: plugins=(rails git textmate ruby lighthouse)
-plugins=(git vi-mode ssh-agent)
+plugins=(git vi-mode)
 
 source $ZSH/oh-my-zsh.sh