Uses 9700K of libraries. Click here for Pure Java version (16519L/118K/406K).
1 | !7 |
2 | |
3 | static S host = "tinybrain.de"; |
4 | static S user = "root"; |
5 | static S remotePath = "/tmp/hello/testfile.txt"; |
6 | |
7 | p-tt { |
8 | print("Connecting to " + host + " as " + user + "..."); |
9 | byte[] data = toUtf8("Hello world!"); |
10 | print("Uploading to: " + remotePath); |
11 | scpUploadWithMkdirs(user, host, remotePath, l(data), new ByteArrayInputStream(data)); |
12 | print("Done! Listing..."); |
13 | print(quickSSH2(user, host, "ls -l " + bashQuote(remotePath), 30)); |
14 | print("Printing file"); |
15 | assertEqualsVerbose("Hello world!", quickSSH2(user, host, "cat " + bashQuote(remotePath), 30)); |
16 | print("OK!"); |
17 | } |
Began life as a copy of #1009982
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: | #1009984 |
Snippet name: | Test scpUploadWithMkdirs with tinybrain.de [OK!] |
Eternal ID of this version: | #1009984/5 |
Text MD5: | 1f0cb0e7ce5f61a17f6d636c403b9dc3 |
Transpilation MD5: | 07bd6996975855bd00e223e044ffefae |
Author: | stefan |
Category: | javax |
Type: | JavaX source code |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2017-11-23 11:33:19 |
Source code size: | 601 bytes / 17 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 431 / 534 |
Version history: | 4 change(s) |
Referenced in: | [show references] |