当前位置:首页 > Stelnet(ssh)登陆华为交换机配置教程
11、配置VTY用户界面支持SSH协议 [Huawei-ui-vty0-4]protocol inbound ? all All protocols ssh SSH protocol telnet Telnet protocol
12、创建SSH用户 [Huawei]ssh user ?
STRING<1-64> The specified user name
[Huawei]ssh user 1
Info: Succeeded in adding a new SSH user. [Huawei]
13、配置SSH用户的认证方式 [Huawei]ssh user 1 ? assign Set the key
authentication-type Authentication type authorization-cmd Authorization mode service-type Set service type sftp-directory Set SFTP directory
[Huawei]ssh user 1 authentication-type ?
all Any authentication mode, any one of password, RSA, and DSA
dsa DSA authentication password Password authentication
password-dsa Both password and DSA authentication modes password-rsa Both password and RSA authentication modes rsa RSA authentication
如果没有使用ssh user命令配置相应的SSH用户,则可以直接执行ssh authentication-type default password命令为用户配置SSH认证缺省采用密码认证,在用户数量比较多时,对用户使用缺省密码认证方式可以简化配置,此时只需再配置AAA用户即可。
14、配置SSH用户的服务类型 [Huawei]ssh user 1 service-type ? all Set all service type sftp Set SFTP service type stelnet Set Stelnet service type
[Huawei]ssh user 1 service-type stelnet
15、配置SSH用户按命令行授权,即只能通过命令行使用 [Huawei]ssh user 1 authorization-cmd ? aaa Set the AAA authorization mode
password认证依靠AAA实现,当用户使用password、password-rsa或password-dsa认证方式登录设备时,需要在AAA视图下创建同名的本地用户。 如果SSH用户使用password认证,则只需要在SSH服务器端生成本地RSA或DSA密钥。
如果SSH用户使用RSA或DSA认证,则在服务器端和客户端都需要生成本地RSA或DSA密钥对,并且服务器端和客户端都需要将对方的公钥配置到本地。
16、对SSH用户进行password、password-dsa或password-rsa认证时在AAA下创建同名用户名
[Huawei-aaa]local-user 1 password irreversible-cipher 023wg.com
17、对SSH用户进行dsa、rsa、password-dsa或password-rsa认证时配置方法
17.1、进入RSA或DSA公共密钥视图 [Huawei]rsa peer-public-key 023wg.com
Enter \end\
[Huawei-rsa-public-key] 或
[Huawei]dsa peer-public-key ?
STRING<1-30> Name of the peer public key
[Huawei]dsa peer-public-key 1 ?
encoding-type Encoding type of the remote peer's public key
[Huawei]dsa peer-public-key 1 encoding-type ? der DER encoded public key # DER编码的公钥 pem PEM encoded public key # PEM编码的公钥
[Huawei]dsa peer-public-key 1 encoding-type der ?
[Huawei]dsa peer-public-key 1 encoding-type der Info: Enter \\.
[Huawei-dsa-public-key]
共分享92篇相关文档