【eNSP实战】配置SSH远程登录

SSH是Secure Shell 的缩写,由国际互联网工程任务组(The Internet Engineering Task Force, IETF)的网络小组所制定。
SSH 是专为远程登录会话提供安全性的协议。利用 SSH 协议可以有效防止远程管理过程中的信息泄露问题

从客户端来看,SSH提供两种级别的安全验证。

  • 第一种级别是基于口令的安全验证。
  • 第二种级别是基于密匙的安全验证。需要依靠密匙,也就是你必须为自己创建一对密匙,并把公用密匙

1、路由器配置(基于口令认证)

[AR1]user-interface vty 0 4		# 进入VTY用户视图
[AR1-ui-vty0-4]authentication-mode aaa		# 设置虚拟终端认证模式为AAA
[AR1-ui-vty0-4]user privilege level 15		# 设置用户权限级别15
[AR1-ui-vty0-4]protocol inbound ssh			# 开启SSH
[AR1-ui-vty0-4]quit
#
[AR1]aaa	# 进入AAA视图
[AR1-aaa]local-user ssh-user password cipher abc@123	# 添加本地用户并设置密码
[AR1-aaa]local-user ssh-user privilege level 15			# 设置本地用户权限级别15
[AR1-aaa]local-user ssh-user service-type ssh			# 设置本地用户允许SSH登录
[AR1-aaa]quit
#
[AR1]ssh user ssh-user authentication-type password		# 设置SSH用户认证模式为密码认证
[AR1]stelnet server enable 		# 开启SSH认证服务

2、交换机配置(基于口令认证)

[LSW1]user-interface vty 0 4		# 进入VTY用户视图
[LSW1-ui-vty0-4]authentication-mode aaa		# 设置虚拟终端认证模式为AAA
[LSW1-ui-vty0-4]protocol inbound ssh		# 开启SSH
[LSW1-ui-vty0-4]quit
#
[LSW1]aaa	# 进入AAA视图
[LSW1-aaa]local-user ssh-user password cipher abc@123	# 添加本地用户并设置密码
[LSW1-aaa]local-user ssh-user privilege level 15		# 设置本地用户权限级别15
[LSW1-aaa]local-user ssh-user service-type ssh			# 设置本地用户允许SSH登录
[LSW1-aaa]quit
#
[LSW1]ssh user ssh-user authentication-type password	# 设置SSH用户认证模式为密码认证
[LSW1]stelnet server enable 		# 开启SSH认证服务
[LSW1]ssh user ssh-user service-type stelnet			# 设置SSH服务类型为stelnet(缺省情况下,SSH用户的服务方式是空,即不支持任何服务方式)
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值