设备型号:WX3510E
问题:telnet能够正常登录,但是SSH无法登录,SSH服务已经开启了。会是什么原因?
(0)
最佳答案
设置ssh、http、https、telnet用户名、密码登录,具体配置如下
ssh server enable //开启ssh服务
telnet server enable //开启telnet服务
ip http enable //开启http服务
ip https enable //开启https服务
line vty 0 4 //创建5个用户线程
authentication-mode scheme //设置认证模式为用户名密码
user-role network-admin //设置权限为管理员
local-user admin class manage //创建admin用户
password simple 123456 //为admin用户设置密码为123456
service-type telnet ssh https http //设置admin用户的服务类型为telnet、ssh、https、http
authorization-attribute user-role network-admin //用户权限为网络管理员
(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
# 配置接口GigabitEthernet1/0/4的IP地址,客户端将通过该地址连接SSH服务器。
[H3C]interface GigabitEthernet1/0/4
[H3C-GigabitEthernet1/0/4]ip address 192.168.10.1 255.255.255.0
[H3C-GigabitEthernet1/0/4]quit
# 设置SSH客户端登录用户线的认证方式为AAA认证。
[H3C]line vty 0 4
[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
(1)
亲~登录后才可以操作哦!
确定你的邮箱还未认证,请认证邮箱或绑定手机后进行当前操作
举报
×
侵犯我的权益
×
侵犯了我企业的权益
×
抄袭了我的内容
×
原文链接或出处
诽谤我
×
对根叔社区有害的内容
×
不规范转载
×
举报说明
重建密钥后可以登录了,是什么原因?