-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathdottelrc.sample
More file actions
51 lines (48 loc) · 3.11 KB
/
dottelrc.sample
File metadata and controls
51 lines (48 loc) · 3.11 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
$telrc = {
'profile' => {
'default' => { 'password' => 'DINGLEHOPPER!', 'user' => $ENV{USER},
'sshoptions' => [ 'UserKnownHostsFile=/dev/null', 'StrictHostKeyChecking=no' ],
'pagercmd' => 'term len 0',
'syntax' => 'Cisco',
},
'casa' => { 'handlers' => { '\cZ' => \&handle_ctrl_z } },
'zhone' => { 'user' => 'admin', 'method' => 'telnet', 'prompt' => '>', 'enablecmd' => 'priv' },
'vyos' => { 'prompt' => '\$', 'pagercmd' => 'set term length 0' },
'juniper' => { 'logoutcmd' => 'exit', 'syntax' => 'Juniper',
'pagercmd' => 'set cli screen-length 0', 'prompt' => '>' },
'dlink' => { 'method' => 'telnet', 'handlers' => { '\177' => \&handle_backspace },
'syntax' => 'Dlink', 'pagercmd' => 'disable clipaging' },
'mikrotik' => { 'logoutcmd' => '/quit', 'prompt' => '>' },
'at' => { 'ciphertype' => 'des', 'user' => 'engr' },
'hatteras' => { 'ciphertype' => 'des' }
},
'rtr' => [ # this is an array so order matters
{ 'regex' => '^cerf$', 'method' => 'telnet', 'hostname' => 'route-server.cerf.net', 'prompt' => 'route-server>' },
{ 'regex' => '^att$', 'user' => 'rviews', 'method' => 'telnet', 'hostname' => 'route-server.ip.att.net', 'prompt' => 'route-server>' },
{ 'regex' => '^ix$', 'user' => 'rviews', 'method' => 'telnet',
'hostname' => 'route-views.oregon-ix.net', 'prompt' => 'route-views>' },
{ 'regex' => '^quagga$', 'method' => 'telnet', 'hostname' => '127.0.0.1', port => 2605 },
{ 'regex' => '^ubi', 'user' => 'ubnt', 'method' => 'ssh' },
{ 'regex' => '192.168.13.10-28', 'profile' => 'zhone_olt' },
# to clarify what we're doing here, if the name matches
# these regex we load the listed profile.
{ 'profile' => 'casa', 'regex' => '^casa1-' },
{ 'profile' => 'zhone', 'regex' => '^dsl' },
{ 'profile' => 'hatteras', 'regex' => '^hat' },
{ 'profile' => 'mikrotik', 'regex' => '^gw1-mkt-site' },
{ 'profile' => 'at', 'regex' => '^(ds|sw).*(site-name).*' },
],
# if we see these strings in the banner while we're connecting to the
# device then we load the corresponding profile
'banners' => {
'Bay Networks BayStack' => 'baystack',
'DES-3(5|3)(50|26) (Ethernet|Fast Ethernet)' => 'dlink',
'Casa Systems' => 'casa',
'JUNOS' => 'juniper',
'VyOS' => 'vyos',
},
# if these exist they will be loaded when the config file is parsed
'syntax' => [
'MyCompanyName',
],
};