交换机配置ssh登录,用户名密码报错,调试了一下,我看着是pki的问题,下面是调试信息,麻烦大家看一下,谢谢大家!
(0)
最佳答案
您好,参考
1.生成RSA和DSA密钥对
[H3C]public-key local create rsa
[H3C]public-key local create dsa
2.设置用户接口上的认证模式为AAA,并让用户接口支持SSH协议
[H3C]user-interface vty 0 4
[H3C-ui-vty0-4]authentication-mode scheme
[H3C-ui-vty0-4]protocol inbound ssh
3.创建用户admin,设置认证密码为luwenju-!@# 登录协议为SSH,能访问的命令级别 为 3
[H3C]local-user admin
[H3C-luser-admin]password cipher luwenju-!@#
[H3C-luser-admin]service-type ssh level 3
4.指定用户admin的认证方式为password
[H3C]ssh user admin authentication-type
password
# 进入系统视图,并开启ssh服务,默认开启。
<H3C> system-view
[H3C] SSH server enable
# 创建本地账号abc,密码为123456,权限级别为network-admin。//如果现场同一个本地用户既需要通过ssh登录,又需要console登录,则服务器类型需要添加 terminal
[H3C] local-user abc
[H3C-luser-abc] password simple 123456
[H3C-luser-abc] service-type ssh terminal
[H3C-luser-abc] authorization-attribute user-role network-admin
[H3C-luser-abc] quit
# 配置VTY接口认证模式为scheme模式(用户名+密码认证)。用于ssh登录
[H3C] line vty 0 4
[H3C-ui-vty0-4] authentication-mode scheme //另两种认证模式为None(无密码)和Password(单密码)
[H3C-ui-vty0-4] quit
(0)
<H3C> system-view
[H3C]public-key local create rsa
[H3C] public-key local create dsa
[H3C] SSH server enable
[H3C] local-user admin
[H3C-luser-abc] password simple 12345678
[H3C-luser-abc] service-type ssh terminal
[H3C-luser-abc] authorization-attribute user-role network-admin
[H3C-luser-abc] quit
[H3C] line vty 0 4
[H3C-ui-vty0-4] authentication-mode scheme
[H3C-ui-vty0-4] quit
按照这个配置配置一下试试看。
(0)
提示用户名或密码错误
您好:
debug中failed的原因是无效的用户名或密码错误;可根据以下命令核对ssh配置是否完整
# 生成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
# 设置SSH客户端登录用户界面的认证方式为password认证。
[H3C] line vty 0 4
[H3C-line-vty0-4]authentication-mode scheme
# 创建本地用户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
#保存配置
[H3C]save force
(0)
亲~登录后才可以操作哦!
确定你的邮箱还未认证,请认证邮箱或绑定手机后进行当前操作
举报
×
侵犯我的权益
×
侵犯了我企业的权益
×
抄袭了我的内容
×
原文链接或出处
诽谤我
×
对根叔社区有害的内容
×
不规范转载
×
举报说明