华为交换机开启SSH服务

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了华为交换机开启SSH服务相关的知识,希望对你有一定的参考价值。

1、创建本地密钥对

[Core-SW]rsa local-key-pair create 
The key name will be: Core-SW_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 = 2048]:
Generating keys...
..+++++
........................++
....++++
...........++

2、检查是否存在SSH user(可跳过),系统提示没有SSH user 存在

[Core-SW]dis ssh user-information 
Info: No SSH user exists.   

3、创建SSH user

[Core-SW]ssh user test     \\可以直接敲第二行命令
[Core-SW]ssh user test authentication-type password  \\认证模式为密码认证
[Core-SW]ssh user test service-type stelnet  \\服务类型为stelnet,即SSH

4、创建用户

[Core-SW]aaa
[Core-SW-aaa]local-user test password cipher xxx(xxx处为你想要设置的密码)
Info: Add a new user.
[Core-SW-aaa]local-user test privilege level 3  \\用户level最高到15
[Core-SW-aaa]local-user test service-type ?
  8021x     802.1x user
  bind      Bind authentication user
  ftp       FTP user
  http      Http user
  ppp       PPP user
  ssh       SSH user
  telnet    Telnet user
  terminal  Terminal user
  web       Web authentication user
  x25-pad   X25-pad user
[Core-SW-aaa]local-user test service-type ssh  \\开启该用户允许使用SSH访问设备的权限

5、启用SSH(stelnet)服务

[Core-SW]stelnet server enable 
Info: Succeeded in starting the Stelnet server.

6、配置vty界面支持的登录协议

[Core-SW]user-interface vty 0 4
[Core-SW-ui-vty0-4]protocol inbound ?
  all     All protocols
  ssh     SSH protocol
  telnet  Telnet protocol
[Core-SW-ui-vty0-4]protocol inbound ssh

以上是关于华为交换机开启SSH服务的主要内容,如果未能解决你的问题,请参考以下文章

开启华为交换机路由器ssh访问

华为交换机用命令更改已有admin账户开启SSH

h3c交换机s5600怎样开启ssh

华为交换机如何ssh管理?

华为S5700交换机开启telnet远程登陆配置

怎么查看ssh服务是不是开启