(command.CommandList
  children: [
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:tid)
          op: assign_op.Equal
          rhs: {(DQ <keyscan>)}
          spids: [7]
        )
      ]
    )
    (C {<rm>} {<-f>} {(${ Id.VSub_Name OBJ) <'/host.dsa'>})
    (C {<start_sshd>})
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:KEYTYPES)
          op: assign_op.Equal
          rhs: 
            {
              (command_sub
                left_token: <Id.Left_Backtick '`'>
                child: (C {(${ Id.VSub_Name SSH)} {<-Q>} {<key-plain>})
              )
            }
          spids: [29]
        )
      ]
    )
    (command.If
      arms: [
        (if_arm
          cond: 
            (condition.Shell
              commands: [(command.Sentence child:(C {<ssh_version>} {<1>}) terminator:<Id.Op_Semi _>)]
            )
          action: [
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:KEYTYPES)
                  op: assign_op.Equal
                  rhs: {(DQ (${ Id.VSub_Name KEYTYPES) <' rsa1'>)}
                  spids: [52]
                )
              ]
            )
          ]
          spids: [42 49]
        )
      ]
    )
    (command.ForEach
      iter_name: t
      iter_words: [{($ Id.VSub_DollarName '$KEYTYPES')}]
      do_arg_iter: F
      body: 
        (command.DoGroup
          children: [
            (C {<trace>} {(DQ <'keyscan type '> ($ Id.VSub_DollarName '$t'))})
            (command.Simple
              words: [
                {(${ Id.VSub_Name SSHKEYSCAN)}
                {<-t>}
                {($ Id.VSub_DollarName '$t')}
                {<-p>}
                {($ Id.VSub_DollarName '$PORT')}
                {<127.0.0.1>}
                {<127.0.0.1>}
                {<127.0.0.1>}
              ]
              redirects: [
                (redir
                  op: <Id.Redir_Great '>'>
                  loc: (redir_loc.Fd fd:1)
                  arg: {<'/dev/null'>}
                )
                (redir op:<Id.Redir_GreatAnd '2>&'> loc:(redir_loc.Fd fd:2) arg:{<1>})
              ]
              do_fork: T
            )
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:r)
                  op: assign_op.Equal
                  rhs: {($ Id.VSub_QMark '$?')}
                  spids: [111]
                )
              ]
            )
            (command.If
              arms: [
                (if_arm
                  cond: 
                    (condition.Shell
                      commands: [
                        (command.Sentence
                          child: 
                            (C {<Id.Lit_LBracket '['>} {($ Id.VSub_DollarName '$r')} {<-ne>} {<0>} 
                              {<Id.Lit_RBracket ']'>}
                            )
                          terminator: <Id.Op_Semi _>
                        )
                      ]
                    )
                  action: [
                    (C {<fail>} 
                      {
                        (DQ <'ssh-keyscan -t '> ($ Id.VSub_DollarName '$t') <' failed with: '> 
                          ($ Id.VSub_DollarName '$r')
                        )
                      }
                    )
                  ]
                  spids: [115 128]
                )
              ]
            )
          ]
        )
    )
  ]
)