华为交换机ssh思科交换机_配置华为交换机ssh方式登录

本文详细介绍了如何配置华为交换机进行SSH登录,包括VTY界面认证方式设置、创建SSH用户、配置用户密码和服务类型、生成密钥对、启用STelnet和SFTP服务。此外,还提供了SSH状态信息和用户信息的查看方法,以及客户端的首次认证操作。
摘要由CSDN通过智能技术生成

LAB2: 配置SSH登陆(Passworkd认证)

1.配置VTY界面的认证方式和协议

[HW_FW]user-interface vty 0 4

[HW_FW-ui-vty0-4]authentication-mode aaa

[HW_FW-ui-vty0-4]protocol inbound ssh

2.创建SSH用户,认证方式为password

[HW_FW]ssh user sshuser

[HW_FW]ssh user sshuser authentication-type password

3.配置Client的密码为C1sco123,服务方式为ssh

[HW_FW]aaa

[HW_FW-aaa]local-user sshuser password cipher C1sco123

[HW_FW-aaa]local-user sshuser service-type ssh

4.生成密钥对

[HW_FW]rsa local-key-pair create

20:30:02 2014/06/02

The key name will be: HW_FW_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 = 768]:2048

Generating keys...

.......++++++

...++++++

..........................................++++++++

..............++++++++

5.启用STelent/SFTP服务

[HW_FW]stelnet server enable

[HW_FW]sftp server enable

6.启用STelnet和SFTP

[HW_FW]ssh user sshuser service-type stelnet

[HW_FW]ssh user sshuser service-type sftp

注:如果用户采用SFTP服务登录时,需要执行ssh user sftp-directory命令,配置SSH用

户的SFTP服务授权目录。

7.SSH Client通过STtelnet/SFTP方式连接SSH Server

a.第一次登录,需要激活SSH客户端首次认证功能

[R1]ssh client first-time enable

[SSH.C]stelnet 202.100.1.10

22:00:53 2014/06/02

Please input the username:sshuser

Trying 202.100.1.10 ...

Press CTRL+K to abort

Connected to 202.100.1.10 ...

The server is not authenticated. Continue to access it? [Y/N] :y

Save the server's public key? [Y/N] :y

The server's public key will be saved with the name 202.100.1.10. Please wait...

Enter password:

***********************************************************

* Copyright (C) 2010-2013 Huawei Technologies Co., Ltd. *

* Without the owner's prior written consent, *

* no decompiling or reverse-engineering shall be allowed. *

* Notice: *

* This is a private communication system. *

* Unauthorized access or use may lead to prosecution. *

***********************************************************

Note: The max number of VTY users is 5, and the current number

of VTY users on line is 1.

1.查看SSH状态信息

HW_FW]display ssh server status

21:19:13 2014/06/02

SSH version : 1.99

SSH connection timeout : 60 seconds

SSH server key generating interval : 0 hours

SSH authentication retries : 3 times

SFTP server : Enable

STELNET server : Enable

2.查看SSH用户信息

[HW_FW]display ssh user-information

User 1:

User Name : cisco

Authentication-type : password

User-public-key-name : -

Sftp-directory : -

Service-type : sftp

Authorization-cmd

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值