SCP配置案例

案例配置拓扑
在这里插入图片描述
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这样的机制所以能够确定用户是否是合法的。

  • 0
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值