使用域账户ssh登录Cisco交换机

在之前的公司使用过此方法来管理交换机,不过网络设备都是华为的,现在的公司大部分使用cisco设备,配置方法跟之前差不多,贴上来供大家参考吧。对于交换机的管理来说,nps为交换机提供外部的认证,可以为不同组建立不同权限,但是具体到视图权限的控制还是要在交换机上设定。

一、前提条件

服务器:Windows Server 2012 R2 NPS服务

交换机:Cisco3560

二、配置

1.配置NPS服务器

1.1安装角色

添加角色“网络策略和访问服务”中的网络策略服务器;

1.2添加网络策略

未加密的身份验证(PAP,SPAP)(S),其他都用默认即可。

保存重启服务器后才生效

1.3修改网络策略

a.概述->忽略用户账户的拨入属性

b.设置->Radius属性->标准只保留以下两项:

Service-Type->其他->Login

Login-Service->SSH

1.4添加Radius客户端

 

2.交换机配置

TIDE-CISCO3560#show run

Building configuration...

Current configuration : 14132 bytes

!

! Last configuration change at 13:42:15 BJ Tue Dec 2 2014 by wangchao3

! NVRAM config last updated at 13:42:13 BJ Tue Dec 2 2014 by wangchao3

!

version 12.2

no service pad

no service timestamps debug uptime

service timestamps log datetime msec

no service password-encryption

!

hostname TIDE-CISCO3560

!

boot-start-marker

boot-end-marker

!

enable secret 5 $1$T4Dh$cv/NDd0lGC86ifSjl3obD/

!

username admin privilege 5 secret 5 $1$O6Fj$Cdt5ifcPnRmpOl3PWjR4.1

!

!

aaa new-model

!

!

aaa group server radius Nps01

server-private 10.1.200.23 auth-port 1645 acct-port 1646 key 7 095C4F1A0A1218000F

!

aaa authentication login default group Nps01 local

aaa authorization exec default group Nps01 local

!

!

!

aaa session-id common

clock timezone BJ 0 8

system mtu routing 1500

ip routing

!

!

ip dhcp snooping vlan 144

ip dhcp snooping

no ip domain-lookup

ip domain-name tidepharm.com

ip arp inspection vlan 144

ip radius source-interface Loopback0

!

privilege interface level 5 switchport

privilege interface level 5 ip arp

privilege interface level 5 ip address

privilege configure level 5 interface

privilege configure level 5 vlan

privilege exec level 5 configure terminal

privilege exec level 5 show running

!

line con 0

line vty 0 4

exec-timeout 15 0

transport input ssh

line vty 5 15

exec-timeout 0 1

transport input ssh

郑重声明:本站内容如果来自互联网及其他传播媒体,其版权均属原媒体及文章作者所有。转载目的在于传递更多信息及用于网络分享,并不代表本站赞同其观点和对其真实性负责,也不构成任何其他建议。