Not logged in.  Login/Logout/Register | List snippets | | Create snippet | Upload image | Upload data

16
LINES

< > BotCompany Repo | #1009982 // Test scpUpload with tinybrain.de, auto-find password (~/JavaX-Secret/*/<x>@<server>.ssh.pass) [OK]

JavaX source code [tags: use-pretranspiled] - run with: x30.jar

Uses 4887K of libraries. Click here for Pure Java version (1199L/9K/32K).

!7

static S host = "tinybrain.de";
static S user = "root";
static S remotePath = "/tmp/testfile.txt";

p-tt {
  print("Connecting to " + host + " as " + user + "...");
  byte[] data = toUtf8("Hello world!");
  print("Uploading to: " + remotePath);
  scpUpload(user, host, remotePath, l(data), new ByteArrayInputStream(data));
  print("Done! Listing...");
  print(quickSSH2(user, host, "ls -l " + bashQuote(remotePath), 30));
  print("Printing file");
  print(quickSSH2(user, host, "cat " + bashQuote(remotePath), 30));
}

Author comment

Began life as a copy of #1004834

download  show line numbers  debug dex  old transpilations   

Travelled to 13 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt

No comments. add comment

Snippet ID: #1009982
Snippet name: Test scpUpload with tinybrain.de, auto-find password (~/JavaX-Secret/*/<x>@<server>.ssh.pass) [OK]
Eternal ID of this version: #1009982/4
Text MD5: a217f1e3026e0efc348c1ef448cb74a7
Transpilation MD5: 7918d1d071af08e8868fee5d350fdcb0
Author: stefan
Category: javax
Type: JavaX source code
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2017-08-28 01:02:29
Source code size: 538 bytes / 16 lines
Pitched / IR pitched: No / No
Views / Downloads: 555 / 608
Version history: 3 change(s)
Referenced in: [show references]