Added documentation for ssh-alias
This commit is contained in:
parent
5dcfff4819
commit
1971c3aaf0
2 changed files with 20 additions and 0 deletions
13
modules/ssh-alias/README.md
Normal file
13
modules/ssh-alias/README.md
Normal file
|
@ -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…
Add table
Reference in a new issue