code: def load_connection_settings(self):
          
          existing_kernel = CONF.get("existing-kernel", "settings", {})
  
          connection_file_path = existing_kernel.get("json_file_path", "")
          is_remote = existing_kernel.get("is_remote", False)
          username = existing_kernel.get("username", "")
          hostname = existing_kernel.get("hostname", "")
          port = str(existing_kernel.get("port", 22))
          is_ssh_kf = existing_kernel.get("is_ssh_keyfile", False)
          ssh_kf = existing_kernel.get("ssh_key_file_path", "")
  
          if connection_file_path != "":
              self.cf.setText(connection_file_path)
          if username != "":
              self.un.setText(username)
          if hostname != "":
              self.hn.setText(hostname)
          if ssh_kf != "":
              self.kf.setText(ssh_kf)
          self.rm_group.setChecked(is_remote)
          self.pn.setText(port)
          self.kf_radio.setChecked(is_ssh_kf)
          self.pw_radio.setChecked(not is_ssh_kf)
  
          try:
              import keyring
              ssh_passphrase = keyring.get_password("spyder_remote_kernel",
                                                    "ssh_key_passphrase")
              ssh_password = keyring.get_password("spyder_remote_kernel",
                                                  "ssh_password")
              if ssh_passphrase:
                  self.kfp.setText(ssh_passphrase)
              if ssh_password:
                  self.pw.setText(ssh_password)
          except Exception:
              pass
docs: Load the user's previously-saved kernel connection settings.