1、SSH是密文传输协议,比Telnet更加安全,所以需要先创建秘钥对,用来加密传输内容用的

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、创建admin用户,设置密码,开启ssh登录权限

aaa //进入AAA模式,华为更改用户都要进入此模式

local-user admin password cipher XXX //新建用户admin,并设置密码为XXX

Info: Add a new user.

local-user test privilege level 15 //设置用户级别,一般设置3,我习惯设置最高15

local-user admin service-type ssh telnet http //用户登录的访问方式,我习惯开启这三种,开多方便,开少安全

3、查询创建ssh用户,赋予用户SSH

dis ssh user-information //查看是否存在ssh用户

Info: No SSH user exists.

ssh user admin authentication-type password //创建ssh用户admin,设置认证模式为密码认证

ssh user admin service-type stelnet //设置admin用户的登录服务类型为stelnet,即SSH

4、交换机启用SSH服务

ssh server enable //开启SSH服务

Info: Succeeded in starting the Stelnet server.

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

user-interface vty 0 4 //进入vty 0 4的界面

authentication-mode aaa //设置密码模式为AAA里的设置

protocol inbound all //我习惯设置all,支持所有

好文链接

评论可见,请评论后查看内容,谢谢!!!评论后请刷新页面。