最佳答案
参考以下配置
# 生成RSA密钥对。
<H3C>system-view
System View: return to User View with Ctrl+Z.
[H3C]public-key local create rsa
The range of public key size is (512 ~ 2048).
NOTES: If the key modulus is greater than 512,
It will take a few minutes.
Press CTRL+C to abort.
Input the bits of the modulus[default = 1024]:
Generating Keys...
++++++++++++++++++++++++++++++++++++++
+++++++++++
+++++++++++++
+++
# 生成DSA密钥对。
[H3C]public-key local create dsa
The range of public key size is (512 ~ 2048).
NOTES: If the key modulus is greater than 512,
It will take a few minutes.
Press CTRL+C to abort.
Input the bits of the modulus[default = 1024]:
Generating Keys...
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*+++++++++++++
# 启动SSH服务器。
[H3C]ssh server enable
# 配置VLAN虚接口Vlan-interface 1的IP地址为192.168.1.1,此地址作为SSH服务器的登录地址。
[H3C]interface Vlan-interface 1
[H3C-Vlan-interface1] ip address 192.168.1.1 255.255.255.0
[H3C-Vlan-interface1]quit
# 设置SSH客户端登录用户界面的认证方式为password认证。
[H3C] line vty 0 4
[H3C-line-vty0-4]authentication-mode scheme
# 设置Router上远程用户登录协议为SSH。
[H3C-line-vty0-4]protocol inbound ssh
[H3C-line-vty0-4]quit
# 创建本地用户client001,密码为aabbcc,并设置用户访问的命令级别为最高级别3。
[H3C] local-user client001 class manage
[H3C-luser-manage-client001]password simple aabbcc
[H3C-luser-manage-client001]service-type ssh
[H3C-luser-manage-client001] authorization-attribute user-role network-admin
[H3C-luser-manage-client001]quit
# 配置SSH用户client001的服务类型为Stelnet,认证方式为password认证(此步骤非必配)。
[H3C]ssh user client001 service-type stelnet authentication-type password
#保存配置
[H3C]save force
<H3C> system
[H3C] telnet server enable
# 配置VTY接口认证模式为scheme模式(用户名+密码认证)。
[H3C]line vty 0 63
[H3C-line-vty0-63]authentication-mode scheme
[H3C-line-vty0-63]qu
# 创建本地账号admin,密码为admin,权限级别为管理员权限network-admin。
[H3C] local-user admin class manage
[H3C-luser-manage-admin]password simple admin //这个配置之后,系统会自动加密
[H3C-luser-manage-admin]authorization-attribute user-role network-admin //系统默认是操作员权限
[H3C-luser-manage-admin]service-type telnet
[H3C-luser-manage-admin]quit
# 保存配置。
[H3C] save force
(0)
亲~登录后才可以操作哦!
确定你的邮箱还未认证,请认证邮箱或绑定手机后进行当前操作
举报
×
侵犯我的权益
×
侵犯了我企业的权益
×
抄袭了我的内容
×
原文链接或出处
诽谤我
×
对根叔社区有害的内容
×
不规范转载
×
举报说明
暂无评论