路由交换技术

交换机路由器之前telent和SSH配置教程

2018-12-26  本文已影响83人  cf6d95617c55

太久没有配置网络交换机,基本的配置都忘记了七七八八了,作为一个运维工程师。要时刻保持着不断学习的态度,用知识来武装自己。好了,废话不多说。直接进入今天的主题

交换机路由器配置ssh

实验拓扑

拓扑

创建VLAN100

[SW] vlan 100
[SW-vlan100] quit

配置接口GE0/0/1:

[SW] interface GigabitEthernet 0/0/1
[SW-GigabitEthernet0/0/1] port link-type access
[SW-GigabitEthernet0/0/1] port default vlan 100

为交换机的Vlanif100配置IP地址:

[SW] interface Vlanif 100
[SW-Vlanif100] ip address 192.168.1.100 24

配置用于SSH登录的用户名(client001)、密码(Huawei123):

[SW] aaa
[SW-aaa] local-user client001 password cipher Huawei123
[SW-aaa] local-user client001 privilege level 3
[SW-aaa] local-user client001 service-type ssh
[SW-aaa] quit

在交换机上生成本地密钥对:

[SW] rsa local-key-pair create
The key name will be: SW_Host
The range of public key size is (512 ~ 2048).
NOTES: If the key modulus is greater than 512,
it will take a few minutes.
Input the bits in the modulus[default = 512]:
Generating keys...
...++++++++++++
.++++++++++++
..................++++++++
......++++++++

激活Stelnet服务:

[SW] stelnet server enable
[SW] ssh authentication-type default password
[SW] ssh user client001 authentication-type password
[SW] ssh user client001 service-type all

配置VTY(虚拟终端)界面,身份认证方式为AAA认证,允许用户以SSH的方式接入:

[SW] user-interface vty 0 4
[SW-ui-vty0-4] authentication-mode aaa
[SW-ui-vty0-4] protocol inbound ssh

交换机路由器配置telent

创建VLAN100:

[SW] vlan 100
[SW-vlan100] quit

配置接口GE0/0/1:

[SW] interface GigabitEthernet 0/0/1
[SW-GigabitEthernet0/0/1] port link-type access
[SW-GigabitEthernet0/0/1] port default vlan 100
[SW] interface Vlanif 100
[SW-Vlanif100] ip address 192.168.1.100 24

配置用于Telnet登录的用户名(telnetuser)、密码(Huawei123):

[SW] aaa
[SW-aaa] local-user telnetuser password cipher Huawei123
[SW-aaa] local-user telnetuser privilege level 3 #用户级别为3级
[SW-aaa] local-user telnetuser service-type telnet #用户服务类型为telent

配置VTY(Virtual Teletype Terminal,虚拟终端)界面,身份认证方式为AAA认证:

[SW] telnet server enable
[SW] user-interface vty 0 4
[SW-ui-vty0-4] authentication-mode aaa

好记性不如烂笔头

上一篇下一篇

猜你喜欢

热点阅读