private void installMetadata()

in infrastructure/src/main/java/org/apache/geode/infrastructure/aws/MetadataInstaller.java [55:71]


  private void installMetadata(String host) {
    try (SSHClient client = new SSHClient(CONFIG)) {
      client.addHostKeyVerifier(new PromiscuousVerifier());
      connect(host, client);
      client.authPublickey(user, privateKey.toFile().getAbsolutePath());
      SFTPClient sftpClient = client.newSFTPClient();
      String dest = "/home/" + user + "/geode-benchmarks-metadata.json";

      sftpClient.put(new FileSystemFile(metadata.toFile()), dest);
      sftpClient.setattr(dest, new FileAttributes.Builder()
          .withPermissions(Collections.singleton(FilePermission.USR_R)).build());
    } catch (IOException e) {
      throw new UncheckedIOException(e);
    } catch (InterruptedException e) {
      throw new RuntimeException(e);
    }
  }