案例配置拓扑
2 案例配置需求
1、 按照拓扑完成基础IP配置;
2、 在R1上配置SSH,R1能够被R2 SSH远程登录;
3、 在R1上配置AAA认证,SSH认证方式采用本地数据库认证;
4、 配置SCP,让R2能够copy文件到R1
3.案例配置思路
1.根据拓扑配置IP地址
R1(config)#interface fastEthernet 0/0
R1(config-if)#ip address 12.1.1.1 255.255.255.0
R1(config-if)#no shutdown
R2(config)#interface fastEthernet 0/0
R2(config-if)#ip address 12.1.1.2 255.255.255.0
R2(config-if)#no shutdown
2.在R1上配置SSH:
R1(config)#ip domain name www.cisco.com
R1(config)#username ccie privilege 15 password cisco
R1(config)#crypto key generate rsa
The name for the keys will be: R1.www.cisco.com
Choose the size of the key modulus in the range of 360 to 2048 for your
General Purpose Keys. Choosing a key modulus greater than 512 may take a few minutes.
How many bits in the modulus [512]: 1024
% Generating 1024 bit RSA keys, keys will be non-exportable...[OK]
R1(config)#line vty 0 4
R1(config-line)#transport input ssh
R1(config-line)#login local
在R2上远程SSH登录到R1
3.在R1上配置AAA认证,SSH认证方式采用本地数据库认证
aaa new-model /开启AAA认证功能/
aaa authentication login default local /指定用户登录认证方式采用本地数据库认证/
aaa authorization exec default local /授权方式采用本地用户数据库进行授权/
在R2上远程SSH登录到R1
R2#ssh -l ccie 12.1.1.1
Password: cisco
R1#
4.配置SCP,让R2能够copy文件到R1;
R1(config)#ip scp server enable
案例检验结果
1.在R2的flash中创建一个文件:
注意:copy flash:R2configuration scp://ccie@12.1.1.1,
flash:R2configuration文件所在的位置和名称
ccie 用户名
12.1.1.1 目标地址
案例总结及其它
1、 SCP:Secure Copy Protocol 安全复制协议
2、 SCP通过认证的方式为Cisco设备的配置和映像复制提供安全,这种安全是基于SSH的。
3、 在配置SCP之前,必须配置SSH,认证和授权。正因为有了SSH和AAA这样的机制所以能够确定用户是否是合法的。