peibaishi 发表于 2018-7-25 08:49:06

华为SSH、Console配置

  set console密码   
  * ****************************
  user-interface console 0
  authentication-mode password
  set authentication password cipher ***
  ***********************************
  删除默认用户
  * ***********************************
  user-interface vty 0 4
  undo set authentication password
  undo user privilege level
  创建SSH用户    *
  ******************
  rsa local-key-pair create
  user-interface vty 0 4
  user privilege level 3
  authentication-mode
  aaaprotocol inbound ssh
  ssh user admin
  ssh user admin authentication-type password
  stelnet server enable
  ssh user admin service-type stelnet aaa
  local-user admin password cipher ***
  local-user admin service-type ssh
  添加SSH用户               *
  ***************************
  ssh user *** authentication-type password
  ssh user *** service-type stelnet
  aaalocal-user *** password cipher ***
  local-user *** service-type ssh
  local-user guest level 1(创建guest用户时需要此命令)
  aaaundo local-user ***
  ****************************
  SSH ACL设置                *
  ****************************
  acl number 2001rule 10 permit source IP地址或网络地址
  rule 20 deny   user-interface vty 0 4
  acl 2001 inbound
  acl number 2001
  undo rule 10
  rule 10 permit source 10.3.0.0 0.0.0.255
  -------------------------------------------------------------------------
  3. 配置步骤(SSH认证方式为口令认证)
   rsa local-key-pair create
  & 说明:如果此前已完成生成本地密钥对的配置,可以略过此项操作。
   user-interface vty 0 4
   authentication-modescheme
   protocol inbound ssh
   local-user client001
   password simplehuawei
   service-type ssh
   ssh user client001authentication-type password
  SSH的认证超时时间、重试次数以及服务器密钥更新时间可以采取系统默认值,这些配置完成以后,您就可以在其它与以太网交换机连接的终端上,运行支持SSH1.5的客户端软件,以用户名client001,密码huawei,访问以太网交换机了。
  #
  在交换机的system-view视图下生成本地密钥,位数为1024
  rsalocal-key-pair create
  The local-key-pair will be created.

  The range of public key>  NOTES: If the key modulus is greater than 512,
  It will take a few minutes.
  Input the bits in the modulus:
  Generating keys...
  ......++++++
  ........................++++++
  ..Done!
  
  OK,现在就可以SSH到交换机了.
  附H3C交换机SSH的基本配置.
  local-user root
  password simple 66070511
  service-type ssh telnet
  level 3
  ssh user root authentication-type all
  ssh user root service-type stelnet
  #
  user-interface aux 0
  user-interface vty 0 4
  authentication-mode scheme
  user privilege level 3
  protocol inbound ssh
  #
  H3C工程师配置
  & 说明:
  如果此前已完成生成本地密钥的配置,可以略过此步操作。
  (2)       设置用户登录认证方式。
  下面按照两种认证方式分别进行配置。
  l            password认证。
  # 设置用户接口上的认证模式为AAA认证。
   user-interface vty 0 4
   authentication-modescheme
  # 指定用户client001的登录协议为SSH,认证方式为password。
   protocol inboundssh   //这里可以不配置,默认是支持所有的,包含ssh,telnet等,默认ALL(否则SSH 无法登陆)
   local-user client001
   password simplehuawei
   ssh user client001authentication-type password
  6500上有些软件版本只能支持的SSH的版本为1.5,使用时请正确选择客户端版本。目前65只支持作为SSH服务器,不能作为SSH客户端;31XX版本中可以支持SSH2.0,可以作为服务器和客户端。
  2300系列支持ssh1.x
页: [1]
查看完整版本: 华为SSH、Console配置