快捷搜索:  汽车  科技

华为交换机怎么ssh登录别的交换机(华为交换机配置ssh远程登录)

华为交换机怎么ssh登录别的交换机(华为交换机配置ssh远程登录)[SW1] aaa [SW1-aaa] local-user client001 password cipher Huawei123 [SW1-aaa] local-user client001 privilege level 3 [SW1-aaa] local-user client001 service-type ssh [SW1-aaa] quit 在交换机上生成本地密钥对:[SW1] interface Vlanif 100 [SW1-Vlanif100] ip address 192.168.35.101 24 配置用于SSH登录的用户名(sshuser)、密码(huawei123):创建VLAN100:[SW1] vlan 100 [SW1-vlan100] quit 配置接口GE0/0/1:[SW1] interface GigabitEthernet 0/0/1 [SW1-

实验拓扑及描述

华为交换机怎么ssh登录别的交换机(华为交换机配置ssh远程登录)(1)

在上图所示的拓扑中,Cloud1与交换机LSW1直连,我们将Cloud1规划在VLAN100内,同时也为交换机在VLAN100的虚拟接口规划了IP地址192.168.35.101/24。其中Cloud1添加的是虚拟机的虚拟网卡。

实验需求

完成交换机的配置,使得物理机能够通过SSH的方式登录到该交换机。

实现步骤及配置

cloud的配置如下:

华为交换机怎么ssh登录别的交换机(华为交换机配置ssh远程登录)(2)

SW1的配置如下:

创建VLAN100:

[SW1] vlan 100 [SW1-vlan100] quit

配置接口GE0/0/1:

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

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

[SW1] interface Vlanif 100 [SW1-Vlanif100] ip address 192.168.35.101 24

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

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

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

[SW1] 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

这样就完成了ssh远程登录交换机啦,是不是很简单呢,看完还不懂的小伙伴们可以观看视频教程。

猜您喜欢: