user-interface vty 0 4
#
authentication-mode aaa
#
protocol inbound ssh
#
quit
#
ssh user huawei authentication-type password
#
ssh user huawei service-type stelnet
#
aaa
#
local-user shouxin password cipher huawei
#
local-user shouxin privilege level 15
#
local-user shouxin service-type ssh
#
quit
#
rsa local-key-pair create
stelnet server enable
#
ssh client first-time enable
其他网络设备登录到本地,首次连接需要输入该命令,电脑不需要
解释
user-interface vty 0 4 虚拟连接数
authentication-mode aaa 三A模式认证
protocol inbound ssh 允许ssh进入
quit 退出
ssh user huawei authentication-type password 认证类型
ssh user huawei service-type stelnet 服务类型
aaa 进入三A模式
local-user huawei password cipher huawei 创建本地用户huawei使用密文密码huawei
local-user huawei privilege level 15 给予该用户的权限(版本不同有的是3有的是15)
local-user huawei service-type ssh 该用户的服务类型为SSH
quit 退出
rsa local-key-pair create 创建本地秘钥
中间这两格用户创建本机秘钥自动回车使用
stelnet server enable 启动ssh