| 12345678910111213141516 |
- #
- # Automagic ssh to known hosts.
- # Thanks to:
- # https://github.com/dangerous/dotfiles
- # Works in conjunction with .ssh/config for username@hostname
- #
- ## hosts file
- alias hosts='sudo vim /etc/hosts'
- local _myhosts
- _myhosts=( ${${${${(f)"$(<$HOME/.ssh/known_hosts)"}:#[0-9]*}%%\ *}%%,*} )
- for host in $_myhosts; do
- alias $host="ssh $host"
- done
|