msr3640配置ssh用户登录,采用hash密码方式,具体怎么配置
(0)
最佳答案
您好,参考
V5 ssh配置
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
v7开启SSH服务和创建登录账号密码
# 进入系统视图,并开启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
# 生成RSA密钥对,在提示“Y/N”的时候选择“Y”。
[H3C]public-key local create rsa
The local key pair already exists.
Confirm to replace it? [Y/N]:y
The range of public key modulus is (512 ~ 2048).
If the key modulus is greater than 512, it will take a few minutes.
Press CTRL+C to abort.
Input the modulus length [default = 1024]:
Generating Keys....
Create the key pair successfully.
# 生成DSA密钥对
[H3C]public-key local create dsa
The range of public key modulus is (512 ~ 2048).
If the key modulus is greater than 512, it will take a few minutes.
Press CTRL+C to abort.
Input the modulus length [default = 1024]:
Generating Keys.....
Create the key pair successfully.
# 开启SSH服务器功能
[H3C]ssh server enable
# 设置SSH客户端登录用户线的认证方式为AAA认证。
[H3C]line vty 0 63
[H3C-line-vty0-63]authentication-mode scheme
[H3C-line-vty0-63]quit
# 创建设备管理类本地用户为admin,密码为admin;并设置服务类型为SSH,用户角色为network-admin。
[H3C]local-user admin
[H3C-luser-manage-admin]service-type ssh
[H3C-luser-manage-admin]authorization-attribute user-role network-admin
[H3C-luser-manage-admin]password simple admin
[H3C-luser-manage-admin]quit
(0)
暂无评论
您好,请知:
使用如下命令生成就可以了。
<H3C>system-view
# 生成RSA密钥对,在提示“Y/N”的时候选择“Y”。
[H3C]public-key local create rsa
The local key pair already exists.
Confirm to replace it? [Y/N]:y
The range of public key modulus is (512 ~ 2048).
If the key modulus is greater than 512, it will take a few minutes.
Press CTRL+C to abort.
Input the modulus length [default = 1024]:
Generating Keys....
Create the key pair successfully.
# 生成DSA密钥对
[H3C]public-key local create dsa
The range of public key modulus is (512 ~ 2048).
If the key modulus is greater than 512, it will take a few minutes.
Press CTRL+C to abort.
Input the modulus length [default = 1024]:
Generating Keys.....
Create the key pair successfully.
以下是SSH生成的参考命令:
1、创建管理员账号,并赋予最高权限,仅允许SSH登录
[H3C]local-user admin
New local user added.
[H3C-luser-manage-admin]password simple admin
[H3C-luser-manage-admin]service-type ssh
[H3C-luser-manage-admin]authorization-attribute user-role network-admin
[H3C-luser-manage-admin]quit
2、开启SSH功能
[H3C]ssh server enable
3、在VTY调用本地用户登录
[H3C]line vty 0 4
[H3C-line-vty0-4]authentication-mode scheme
[H3C-line-vty0-4]protocol inbound ssh
[H3C-line-vty0-4]quit
(0)
暂无评论
亲~登录后才可以操作哦!
确定你的邮箱还未认证,请认证邮箱或绑定手机后进行当前操作
举报
×
侵犯我的权益
×
侵犯了我企业的权益
×
抄袭了我的内容
×
原文链接或出处
诽谤我
×
对根叔社区有害的内容
×
不规范转载
×
举报说明
暂无评论