parameters: (self)
return_statement: return public.returnMsg(False, 'No password authentication')
docstring: 开启密码登陆
          get: 无需传递参数
docstring_summary: 开启密码登陆
          get: 无需传递参数
docstring_tokens: 开启密码登陆 get : 无需传递参数
function: def start_password(self):
          '''
          开启密码登陆
          get: 无需传递参数
          '''
          file = public.readFile(self.__SSH_CONFIG)
          if isinstance(file, str):
              if file.find('PasswordAuthentication') != -1:
                  file_result = file.replace('\nPasswordAuthentication no', '\nPasswordAuthentication yes')
                  self.wirte(self.__SSH_CONFIG, file_result)
                  self.restart_ssh()
                  return public.returnMsg(True, 'Turn on password authentication successfully')
              else:
                  file_result = file + '\nPasswordAuthentication yes'
                  self.wirte(self.__SSH_CONFIG, file_result)
                  self.restart_ssh()
                  return public.returnMsg(True, 'Turn on password authentication successfully')
          return public.returnMsg(False, 'No password authentication')
function_tokens: def start_password ( self ) : file = public . readFile ( self . __SSH_CONFIG ) if isinstance ( file , str ) : if file . find ( 'PasswordAuthentication' ) != - 1 : file_result = file . replace ( '\nPasswordAuthentication no' , '\nPasswordAuthentication yes' ) self . wirte ( self . __SSH_CONFIG , file_result ) self . restart_ssh ( ) return public . returnMsg ( True , 'Turn on password authentication successfully' ) else : file_result = file + '\nPasswordAuthentication yes' self . wirte ( self . __SSH_CONFIG , file_result ) self . restart_ssh ( ) return public . returnMsg ( True , 'Turn on password authentication successfully' ) return public . returnMsg ( False , 'No password authentication' )