-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathREADME
50 lines (31 loc) · 849 Bytes
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
* SSH Client Sample
This is a SSH Client but not a practical SSH Client.
I suppose that this helps us understand SSH Protocol.
I confirm that this works for Debian sid's sshd "SSH-2.0-OpenSSH_5.8p1 Debian-4".
* License
This software is a public domain.
* Build
use sbt 0.10.*(Simple Build Tool, https://github.com/harrah/xsbt/wiki).
% sbt compile
* Usage
Ex: login sshd(localhost:22) using 'test' user (with password 'password') and execute 'ls'.
% ls ~test
a hotate
You can run on sbt.
% sbt
....
> run
...
java.lang.IllegalArgumentException: please run 'scala SSHClientSample [host] [port] [user] [pass] [command]'
...
> run localhost 22 test password ls
...
a
hotate
...
Or you can generate a jar and run java command.
% sbt assembly:package
...
% java -jar target/SSH-client-sample.jar localhost 22 test password ls
a
hotate