天天看點

h3c ssh

l              SSH伺服器端配置

# 在交換機上建立VLAN接口,并為其配置設定IP位址,作為用戶端連接配接的SSH伺服器位址。

<Switch> system-view

[Switch] interface vlan-interface 1

[Switch-Vlan-interface1] ip address 192.168.0.1 255.255.255.0    

[Switch-Vlan-interface1] quit

[Switch]ip route-static 0.0.0.0 0.0.0.0  x.x.x.x            

生成伺服器端的RSA和DSA密鑰對是完成SSH登入的必要操作。

# 生成RSA和DSA密鑰對。

[Switch] public-key local create rsa

[Switch] public-key local create dsa

# 設定使用者接口上的認證模式為AAA認證。

[Switch] user-interface vty 0 4

[Switch-ui-vty0-4] authentication-mode scheme

# 設定使用者接口上支援SSH協定。

[Switch-ui-vty0-4] protocol inbound ssh

[Switch-ui-vty0-4] quit

# 建立使用者client001,設定認證密碼為abc,登入協定為SSH,能通路的指令級别為3。

[Switch] local-user user

[Switch-luser-client001] password simple passwd

[Switch-luser-client001] service-type ssh level 3

[Switch-luser-client001] quit

# 指定使用者user的認證方式為password

[Switch] ssh user user authentication-type password

# 退出儲存

[Switch]quit

[Switch]save