Warning: session_start(): open(/var/lib/php/sessions/sess_inunojdeqnbgvv4onttscq5veg, O_RDWR) failed: No space left on device (28) in /var/www/tb-usercake/models/config.php on line 51
Warning: session_start(): Failed to read session data: files (path: /var/lib/php/sessions) in /var/www/tb-usercake/models/config.php on line 51
import net.schmizz.sshj.xfer.InMemorySourceFile;
import net.schmizz.sshj.xfer.scp.SCPFileTransfer;
// allow any host ID and search for pw in JavaX-Secret
static void scpUploadWithMkdirs(S user, S host, fS remotePath, final long length, final InputStream in) ctex {
final SSHClient client = sshLogin(user, host);
print("Logged in to SSH server " + user + "@" + host);
try {
S remoteDir = dropAfterLastSlash(remotePath);
if (nempty(remoteDir))
client.newSFTPClient().mkdirs(remoteDir);
print("Uploading to on " + user + "@" + host + ": " + remotePath);
SCPFileTransfer fileTransfer = client.newSCPFileTransfer();
fileTransfer.upload(new InMemorySourceFile {
public S getName() { ret "dummy"; }
public long getLength() { ret length; }
public InputStream getInputStream() { ret in; }
}, remotePath);
} finally {
sshDisconnect(client);
}
}