Utils utils = context.utils();
SshClient ssh = credentials != null ? utils
.sshForNode()
.apply(NodeMetadataBuilder.fromNodeMetadata(nodeMetadata)
.credentials(credentials).build())
: utils.sshForNode().apply(node);
try (InputStream is = url.openStream(); ) {
ssh.connect();
File distro = Files.createTempFile("/tmp");
Files.copy(is, new FileOutputStream(distro));