1
0
Fork 0

Added documentation for ssh-alias

pull/322/head
Roey Darwish Dror 12 years ago
parent 5dcfff4819
commit 1971c3aaf0

@ -0,0 +1,13 @@
SSH Alias
=========
Create aliases for connecting to hosts defined in the local ~/.ssh/config file
Usage
-----
Load the module in your zpreztorc file. An alias will be created for each host defined in your ~/.ssh/config file.
In order to connect to a host, you just need to type its host name as it appears in ~/.ssh/config
Authors
-------
- [Roey Darwish Dror](https://github.com/r-darwish)

@ -1,3 +1,10 @@
#
# Create aliases for hosts defined in ~/.ssh/config
#
# Authors:
# Roey Darwish Dror <roey.ghost@gmail.com>
#
local x
for x in $(grep 'Host ' ~/.ssh/config | awk '{ print $2 }'); do
alias $x="ssh $x"

Loading…
Cancel
Save