Subversion Repositories sysadmin_scripts

Rev

Go to most recent revision | Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
78 rodolico 1
This is a reversable set of scripts. You can read an existing ssh config
2
script in via getsshinfo.pl, pass the output to makessh_config and,
3
in theory, get the same functioning configuration back. However, the
4
order will be changed.
5
 
6
Example: grab a personal config file, and send the rewritten result to
7
less
8
 
9
./getsshinfo.pl < ~/.ssh/config | ./makessh_config.pl | less
10
 
11
WARNING: Expects a file containing nothing but host blocks, ie
12
host myname
13
hostname = actual.url
14
port=22
15
user me
16
 
17
host=another.name
18
hostname 127.0.0.1
19
# port and user left as defaults
20
 
21
Anything else is ignored EXCEPT see below, so more complex configurations may
22
get totally barfed up. Especially /etc/ssh/ssh_config. You should manually
23
cut/paste.
24
 
25
It will ignore anything until it finds a line matching the regex
26
^host[= ]+([a-z0-9.-]+)$
27