auto-ssh-hosts.zsh 243 B

123456789
  1. # Automagic ssh to known hosts.
  2. #
  3. # Works in conjunction with .ssh/config for username@hostname
  4. local _myhosts
  5. _myhosts=( ${${${${(f)"$(<$HOME/.ssh/known_hosts)"}:#[0-9]*}%%\ *}%%,*} )
  6. for host in $_myhosts; do
  7. alias $host="ssh $host"
  8. done