aptitude install rancid
root@test:~# aptitude install rancid
...
...
Reading extended state information
Initializing package states...
The following NEW packages will be installed:
cvs{a} expect{a} libfile-copy-recursive-perl{a} rancid tcl8.5{a} update-inetd{a}
0 packages upgraded, 6 newly installed, 0 to remove and 27 not upgraded.
Need to get 3 778kB of archives. After unpacking 10,1MB will be used.
Do you want to continue? [Y/n/?] Y
Writing extended state information...
Fetched 3 778kB in 2 (1 633kB/s)
...
libfile-copy-recursive-perl.
( ... 43319 .)
libfile-copy-recursive-perl ( .../libfile-copy-recursive-perl_0.38-1_all.deb)...
update-inetd.
update-inetd ( .../update-inetd_4.35_all.deb)...
cvs.
cvs ( .../cvs_1%3a1.12.13-12ubuntu1_i386.deb)...
tcl8.5.
tcl8.5 ( .../tcl8.5_8.5.8-2_i386.deb)...
expect.
expect ( .../expect_5.44.1.14-5_i386.deb)...
rancid.
rancid ( .../rancid_2.3.2-1_i386.deb)...
man-db ...
install-info ...
libfile-copy-recursive-perl (0.38-1) ...
update-inetd (4.35) ...
cvs (1:1.12.13-12ubuntu1) ...
Ignoring install-info called from maintainer script
The package cvs should be rebuilt with new debhelper to get trigger support
Ignoring install-info called from maintainer script
The package cvs should be rebuilt with new debhelper to get trigger support
tcl8.5 (8.5.8-2) ...
update-alternatives: `/usr/bin/tclsh8.5' `/usr/bin/tclsh' (tclsh) .
expect (5.44.1.14-5) ...
rancid (2.3.2-1) ...
libc-bin ...
ldconfig deferred processing now taking place
...
...
Reading extended state information
Initializing package states...
Writing extended state information...
root@test:/root# chmod 600 .cloginrc
root@test:/root# ls -la
total 32
drwx------ 5 root root 4096 2010-06-09 12:10 .
drwxr-xr-x 22 root root 4096 2010-06-09 10:38 ..
drwx------ 2 root root 4096 2010-06-09 10:58 .aptitude
-rw-r--r-- 1 root root 3106 2010-04-23 13:45 .bashrc
-rw------- 1 root root 153 2010-06-09 12:10 .cloginrc
drwxr-xr-x 2 root root 4096 2010-06-09 10:59 .debtags
-rw-r--r-- 1 root root 140 2010-04-23 13:45 .profile
drwx------ 2 root root 4096 2010-06-09 10:51 .ssh
add user 10.5.51.* root
add password 10.5.51.* Rsduj%0
add user * admin
add autoenable * 1
add password * P@ssw0rd83
add method * telnet ssh
root@test:/var/lib/rancid/bin# ./rancid-cvs
No conflicts created by this import
cvs checkout: Updating routers
Directory /var/lib/rancid/CVS/routers/configs added to the repository
cvs commit: Examining configs
cvs add: scheduling file `router.db' for addition
cvs add: use `cvs commit' to add this file permanently
/var/lib/rancid/CVS/routers/router.db,v <-- router.db
initial revision: 1.1
root@test:/var/lib/rancid/bin#
10.5.51.17:cisco:up:"backbone"
10.5.51.25:cisco:up:"router1"
10.5.51.33:cisco:up:"router2"
10.5.52.41:cisco:up:"gateway1"
10.5.52.49:cisco:up:"gateway2"
10.5.53.57:cisco:down:"old_"
10.5.54.105:cisco:up:"851_12"
10.5.55.113:cisco:up
10.5.55.129:cisco:up
root@test:/var/lib/rancid/bin# ./clogin -c "sh ver" -f /root/.cloginrc 10.5.51.17
10.5.51.17
spawn telnet 10.5.51.17
Trying 10.5.51.17...
Connected to 10.5.51.17.
Escape character is '^]'.
User Access Verification
Username: root
Password:
VPN_Balkany#
VPN_Balkany#terminal length 0
VPN_Balkany#sh ver
Cisco IOS Software, C850 Software (C850-ADVSECURITYK9-M), Version 12.4(4)T4, RELEASE SOFTWARE (fc2)
Copyright (c) 1986-2006 by Cisco Systems, Inc.
Compiled Thu 03-Aug-06 17:16 by kellythw
ROM: System Bootstrap, Version 12.3(8r)YI3, RELEASE SOFTWARE
VPN_Balkany uptime is 2 days, 23 hours, 12 minutes
System returned to ROM by power-on
System image file is "flash:c850-advsecurityk9-mz.124-4.T4.bin"
This product contains cryptographic features and is subject to United
States and local country laws governing import, export, transfer and
use. Delivery of Cisco cryptographic products does not imply
third-party authority to import, export, distribute or use encryption.
Importers, exporters, distributors and users are responsible for
compliance with US and local country laws. By using this product you
agree to comply with applicable laws and regulations. If you are unable
to comply with US and local laws, return this product immediately.
If you require further assistance please contact us by sending email to
export@cisco.com.
Cisco 851 (MPC8272) processor (revision 0x200) with 59392K/6144K bytes of memory.
Processor board ID FCZ103913RL
MPC8272 CPU Rev: Part Number 0xC, Mask Number 0x10
5 FastEthernet interfaces
128K bytes of non-volatile configuration memory.
20480K bytes of processor board System flash (Intel Strataflash)
Configuration register is 0x2102
VPN_Balkany#exit
Connection closed by foreign host.
root@test:/var/lib/rancid/logs# ls -la
total 52
drwxr-xr-x 2 root root 4096 2010-06-09 13:51 .
drwxr-xr-x 13 root root 4096 2010-06-09 10:57 ..
-rw-r----- 1 root root 41860 2010-06-09 13:51 routers.20100609.135845
starting: 9 13:58:45 MSD 2010
/usr/lib/rancid/bin/control_rancid: 308: sendmail: not found
cvs add: scheduling file `10.5.51.17' for addition
cvs add: use `cvs commit' to add this file permanently
/var/lib/rancid/CVS/routers/configs/10.5.51.17,v <-- 10.5.51.17
initial revision: 1.1
Added 10.5.51.17
cvs add: scheduling file `10.5.51.25' for addition
cvs add: use `cvs commit' to add this file permanently
/var/lib/rancid/CVS/routers/configs/10.5.51.25,v <-- 10.5.51.25
initial revision: 1.1
Added 10.5.51.25
cvs add: scheduling file `10.5.51.33' for addition
cvs add: use `cvs commit' to add this file permanently
/var/lib/rancid/CVS/routers/configs/10.5.51.33,v <-- 10.5.51.33
initial revision: 1.1
Added 10.5.51.33
cvs add: scheduling file `10.5.52.41' for addition
cvs add: use `cvs commit' to add this file permanently
/var/lib/rancid/CVS/routers/configs/10.5.52.41,v <-- 10.5.52.41
initial revision: 1.1
Added 10.5.52.41
cvs add: scheduling file `10.5.52.49' for addition
cvs add: use `cvs commit' to add this file permanently
/var/lib/rancid/CVS/routers/configs/10.5.52.49,v <-- 10.5.52.49
initial revision: 1.1
Added 10.5.52.49
cvs add: scheduling file `10.5.54.105' for addition
cvs add: use `cvs commit' to add this file permanently
/var/lib/rancid/CVS/routers/configs/10.5.54.105,v <-- 10.5.54.105
initial revision: 1.1
Added 10.5.54.105
cvs add: scheduling file `10.5.55.113' for addition
cvs add: use `cvs commit' to add this file permanently
/var/lib/rancid/CVS/routers/configs/10.5.55.113,v <-- 10.5.55.113
initial revision: 1.1
Added 10.5.55.113
cvs add: scheduling file `10.5.55.129' for addition
cvs add: use `cvs commit' to add this file permanently
/var/lib/rancid/CVS/routers/configs/10.5.55.129,v <-- 10.5.55.129
initial revision: 1.1
Added 10.5.55.129
Trying to get all of the configs.
All routers sucessfully completed
cvs diff: Diffing .
cvs diff: Diffing configs
cvs commit: Examining .
cvs commit: Examining configs
/var/lib/rancid/CVS/routers/router.db,v <-- router.db
new revision: 1.2; previous revision: 1.1
/var/lib/rancid/CVS/routers/configs/10.5.51.17,v <-- configs/10.5.51.17
new revision: 1.2; previous revision: 1.1
/var/lib/rancid/CVS/routers/configs/10.5.51.25,v <-- configs/10.5.51.25
new revision: 1.2; previous revision: 1.1
/var/lib/rancid/CVS/routers/configs/10.5.51.33,v <-- configs/10.5.51.33
new revision: 1.2; previous revision: 1.1
/var/lib/rancid/CVS/routers/configs/10.5.52.41,v <-- configs/10.5.52.41
new revision: 1.2; previous revision: 1.1
/var/lib/rancid/CVS/routers/configs/10.5.52.49,v <-- configs/10.5.52.49
new revision: 1.2; previous revision: 1.1
/var/lib/rancid/CVS/routers/configs/10.5.54.105,v <-- configs/10.5.54.105
new revision: 1.2; previous revision: 1.1
/var/lib/rancid/CVS/routers/configs/10.5.55.113,v <-- configs/10.5.55.113
new revision: 1.2; previous revision: 1.1
/var/lib/rancid/CVS/routers/configs/10.5.55.129,v <-- configs/10.5.55.129
new revision: 1.2; previous revision: 1.1
/usr/lib/rancid/bin/control_rancid: 487: sendmail: not found
ending: 9 13:59:29 MSD 2010
root@test:/# telnet 10.5.51.17
Trying 10.5.51.17...
Connected to 10.5.51.17.
Escape character is '^]'.
User Access Verification
Username: root
Password: .
VPN_Balkany#conf t
Enter configuration commands, one per line. End with CNTL/Z.
VPN_Balkany(config)#int fa4
VPN_Balkany(config-if)#des
VPN_Balkany(config-if)#description WAN interface
VPN_Balkany(config-if)#end
VPN_Balkany#exit
Connection closed by foreign host.
root@test:/var/lib/rancid/logs# ls -la
total 16
drwxr-xr-x 2 root root 4096 2010-06-09 14:55 .
drwxr-xr-x 13 root root 4096 2010-06-09 10:57.
-rw-r----- 1 root root 3115 2010-06-09 13:59 routers.20100609.135845
-rw-r----- 1 root root 437 2010-06-09 14:55 routers.20100609.145523
starting: 9 14:55:23 MSD 2010
Trying to get all of the configs.
All routers sucessfully completed.
cvs diff: Diffing .
cvs diff: Diffing configs
cvs commit: Examining .
cvs commit: Examining configs
/var/lib/rancid/CVS/routers/configs/10.5.51.17,v <-- configs/10.5.51.17
new revision: 1.3; previous revision: 1.2
/usr/lib/rancid/bin/control_rancid: 487: sendmail: not found
ending: 9 14:55:58 MSD 2010
Source: https://habr.com/ru/post/96101/
All Articles