思科路由器思科交换机配置命令SSH登陆哪些是必须的配置项

博客访问: 231519
博文数量: 41
博客积分: 2236
博客等级: 大尉
技术积分: 474
注册时间:
IT168企业级官微
微信号:IT168qiye
系统架构师大会
微信号:SACC2013
分类: 系统运维
CISCO交换机上配置初步(含com telnet SSH2)
1 资源:硬件设备:cisco 29xx cisco35xx&&&&&&& 软件ios:& cl2q4-mz.121-22.EA11.bin& 现在支持SSH2的IOS版本要求是k9版本
a 初步配置:conf thostname 2s12l2950hzj1ip domain-name 2s12l2950hzj1.domain no ip domain-lookup&&&&&&&&&&&&&&&&&&&&&& ;关闭主机名查找& int vlan 1ip address 192.168.1.102 255.255.255.192& ;设置管理ip:vlan1的ipno shutdown exitip default-gateway 192.168.1.65no ip http server&&&&&&&&&&&&&;取消http和httpsno ip http secure-server line console 0 logging synchronous&&&&&&&&&&&&&&&&&&&&&& ;日志同步,作用:不打断当前命令行password helpyingline&&&&&&&&&&&&&&&&&&&& ;串口登录密码login& exitenable secret helpyingen&&&&&&&&&&&&&&&&& ;en密码测试串口登录和en密码
b 配置登录用户名和密码(ssh,本地和telnet认证):line vty 0 4password 0 helpyingteltransport input alllogin local&&&&&&&&&&&&&&&&&&&&&&&&&&&&&& ;这里的设置决定了telnet和ssh的登录,login则telnet登录密码是helpyingtel;login local则ssh和他telnet的登录用户名和密码有以下决定(username admin secret 0 helpyingssh)exit&&&&&&&&&&&&&&&&&& 测试telnet登录
c 配置ssh参数crypto key generate rsa & 输入 1024ip ssh authentication-retries 5&&&&&&&&&& ;ssh登录次数限制ip ssh version 2ip ssh time-out 120username admin secret 0 helpyingsshwr测试ssh登录
2s12l2950hzj1#dirDirectory of flash:/
&&& 2& -rwx&&&&&&&& 149& Jan 01 :55 +00:00& env_vars&&& 3& -rwx&&&& 3721216& Jan 01 :02 +00:00& cl2q4-mz.121-22.EA11.bin&&& 4& -rwx&&&&&&&& 736& Mar 01 :26 +00:00& vlan.dat&&& 6& -rwx&&&&&&& 1458& Mar 01 :05 +00:00& config.text&&& 7& -rwx&&&&&&& 1941& Mar 01 :05 +00:00& private-config.text
完整的配置如下:2s12l2950hzj1#sh runBuilding configuration...
Current configuration : 1458 bytes!version 12.1no service padservice timestamps debug uptimeservice timestamps log uptimeno service password-encryption!hostname 2s12l2950hzj1!enable secret 5 $1$oldg$TBQofrg8woCeXp7vsL8aM1!username admin password 0 helpyingsship subnet-zero!no ip domain-lookupip domain-name 2s12l2950hzj1.domainip ssh time-out 120ip ssh authentication-retries 5ip ssh version 2!spanning-tree mode pvstno spanning-tree optimize bpdu transmissionspanning-tree extend system-id!interface FastEthernet0/1!interface FastEthernet0/24!interface Vlan1&ip address 192.168.1.102 255.255.255.192&no ip route-cache!ip default-gateway 192.168.1.65no ip http server!line con 0&password helpyingline&logging synchronous&login&stopbits 1line vty 0 4&password helpyingtel&login localline vty 5 15&login!!end
阅读(5961) | 评论(0) | 转发(0) |
相关热门文章
给主人留下些什么吧!~~
请登录后评论。Cisco交换机配置SSH登录方式
满意答案好评率:0% 配置SSH
#hostname tang
#ip domain-
&在生成加密密码时需要用到用户名和域名
(config)#crypto key generate rsa general-keys modulus 1024
为加密会话产生加密密钥
#ip ssh time-out &1-120& &
&设置ssh最大空闲定时器
#ip ssh authentication-retries &0-5& &
&为ssh连接设计最大失败尝试值
#ip ssh version 2
(config)#username cisco privilege 15 secret 0 cisco
& 设置用户名和密码
#Line vty 0 4
#Login local
#Exec-timeout 60 0
#Logging synchronous
#transport input ssh telnet
router#ssh -l name ip &
配置事例:
Router#conf t
Enter configuration commands, one per line.
&End with CNTL/Z.
Router(config)#line con 0
Router(config-line)#exec-t 60 0
Router(config-line)#password ciscocon
Router(config-line)#logg synch
Router(config-line)#exit
Router(config)#enable secret ciscoexec
Router(config)#no ip domain-lookup
Router(config)#hostname tang
tang(config)#ip domain-
tang(config)#username ciscossh privi 15 secret 0
tang(config)#crypto key gen rsa gen modu 1024
The name for the keys will be:
% The key modulus size is 1024 bits
% Generating 1024 bit RSA keys, keys will be
non-exportable...[OK]
tang(config)#
*Jul 12 03:20:16.183: %SSH-5-ENABLED: SSH 1.99 has been
tang(config)#ip ssh time 60
tang(config)#ip ssh auth 5
tang(config)#ip ssh ver 2
tang(config)#int gig 0/2
tang(config-if)#ip add 192.168.110.1 255.255.255.0
tang(config-if)#no shut
tang(config-if)#
*Jul 12 03:21:24.455: %LINK-3-UPDOWN: Interface
GigabitEthernet0/2, changed state to down
tang(config-if)#
*Jul 12 03:21:24.455: %ENTITY_ALARM-6-INFO: CLEAR INFO Gi0/2
Physical Port Administrative State Down&
*Jul 12 03:21:24.455: %ENTITY_ALARM-6-INFO: ASSERT CRITICAL
Gi0/2 Physical Port Link Down&
tang(config-if)#
*Jul 12 03:21:30.683: %LINK-3-UPDOWN: Interface
GigabitEthernet0/2, changed state to up
tang(config-if)#
*Jul 12 03:21:30.683: %ENTITY_ALARM-6-INFO: CLEAR CRITICAL
Gi0/2 Physical Port Link Down&
*Jul 12 03:21:31.683: %LINEPROTO-5-UPDOWN: Line protocol on
Interface GigabitEthernet0/2, changed state to up
tang(config-if)#
tang(config-if)#exit
tang(config)#line vty 0 4
tang(config-line)#login local
% Login disabled on line 2, until 'password' is set
% Login disabled on line 3, until 'password' is set
% Login disabled on line 4, until 'password' is set
% Login disabled on line 5, until 'password' is set
% Login disabled on line 6, until 'password' is set
tang(config-line)#exec-t 60 0
tang(config-line)#logg synch
tang(config-line)#transport input ssh telnet
SSH登录的用户名和密码为username命令所设置
注意路由器的IOS应该支持SSH才可以配置。一般k9的都支持
已投稿到:
以上网友发言只代表其个人观点,不代表新浪网的观点或立场。温馨提示!由于新浪微博认证机制调整,您的新浪微博帐号绑定已过期,请重新绑定!&&|&&
爱拼才会赢
LOFTER精选
网易考拉推荐
用微信&&“扫一扫”
将文章分享到朋友圈。
用易信&&“扫一扫”
将文章分享到朋友圈。
阅读(7863)|
用微信&&“扫一扫”
将文章分享到朋友圈。
用易信&&“扫一扫”
将文章分享到朋友圈。
历史上的今天
loftPermalink:'',
id:'fks_086',
blogTitle:'华为交换机配置SSH登陆方法 ',
blogAbstract:'\r\n2.1& VRP1.74-0105\r\n2.1.1& 牛刀小试\r\n# 创建SSH用户,并配置相应的权限\r\n&&& local-user huawei service-type administrator ssh password simple 3com\r\n&&& local-user adm service-type operator ssh password simple adm\r\n# 设置系统所支持的远程登录协议SSH及最大连接数5[0-5可选,并可选择附加acl规则]\r\n&&& protocol inbound ssh 5\r\n',
blogTag:'',
blogUrl:'blog/static/',
isPublished:1,
istop:false,
modifyTime:0,
publishTime:8,
permalink:'blog/static/',
commentCount:3,
mainCommentCount:3,
recommendCount:0,
bsrk:-100,
publisherId:0,
recomBlogHome:false,
currentRecomBlog:false,
attachmentsFileIds:[],
groupInfo:{},
friendstatus:'none',
followstatus:'unFollow',
pubSucc:'',
visitorProvince:'',
visitorCity:'',
visitorNewUser:false,
postAddInfo:{},
mset:'000',
remindgoodnightblog:false,
isBlackVisitor:false,
isShowYodaoAd:false,
hostIntro:'爱拼才会赢',
selfRecomBlogCount:'0',
lofter_single:''
{list a as x}
{if x.moveFrom=='wap'}
{elseif x.moveFrom=='iphone'}
{elseif x.moveFrom=='android'}
{elseif x.moveFrom=='mobile'}
${a.selfIntro|escape}{if great260}${suplement}{/if}
{list a as x}
推荐过这篇日志的人:
{list a as x}
{if !!b&&b.length>0}
他们还推荐了:
{list b as y}
转载记录:
{list d as x}
{list a as x}
{list a as x}
{list a as x}
{list a as x}
{if x_index>4}{break}{/if}
${fn2(x.publishTime,'yyyy-MM-dd HH:mm:ss')}
{list a as x}
{if !!(blogDetail.preBlogPermalink)}
{if !!(blogDetail.nextBlogPermalink)}
{list a as x}
{if defined('newslist')&&newslist.length>0}
{list newslist as x}
{if x_index>7}{break}{/if}
{list a as x}
{var first_option =}
{list x.voteDetailList as voteToOption}
{if voteToOption==1}
{if first_option==false},{/if}&&“${b[voteToOption_index]}”&&
{if (x.role!="-1") },“我是${c[x.role]}”&&{/if}
&&&&&&&&${fn1(x.voteTime)}
{if x.userName==''}{/if}
网易公司版权所有&&
{list x.l as y}
{if defined('wl')}
{list wl as x}{/list}}

我要回帖

更多关于 思科交换机登陆方式 的文章

更多推荐

版权声明:文章内容来源于网络,版权归原作者所有,如有侵权请点击这里与我们联系,我们将及时删除。

点击添加站长微信