tinyssh 0.0.4 → 0.0.5
Sign up to get free protection for your applications and to get access to all the features.
- data/bin/tinyssh +9 -9
- metadata +3 -3
data/bin/tinyssh
CHANGED
@@ -7,9 +7,9 @@ require 'highline/import'
|
|
7
7
|
require 'net/ssh'
|
8
8
|
require 'net/scp'
|
9
9
|
|
10
|
-
require '
|
11
|
-
require '
|
12
|
-
require '
|
10
|
+
require 'colorize'
|
11
|
+
require 'tinysshoptparse'
|
12
|
+
require 'tinyssh'
|
13
13
|
|
14
14
|
T = []
|
15
15
|
HOST = []
|
@@ -35,11 +35,11 @@ def main(options)
|
|
35
35
|
|
36
36
|
HOST.each_with_index do |host, index|
|
37
37
|
T << Thread.new {
|
38
|
-
session = Net::SSH.conn(host, options.user,
|
39
|
-
:port => options.port,
|
40
|
-
:password => password,
|
41
|
-
:keys => options.keys,
|
42
|
-
:timeout => options.timeout,
|
38
|
+
session = Net::SSH.conn(host, options.user,
|
39
|
+
:port => options.port,
|
40
|
+
:password => password,
|
41
|
+
:keys => options.keys,
|
42
|
+
:timeout => options.timeout,
|
43
43
|
:passphrase => passphrase.chomp)
|
44
44
|
|
45
45
|
if session.class == String
|
@@ -47,7 +47,7 @@ def main(options)
|
|
47
47
|
next
|
48
48
|
end
|
49
49
|
|
50
|
-
case ARGV[0]
|
50
|
+
case ARGV[0]
|
51
51
|
when 'r', 'run' then OUTPUT[index] = session.run(ARGV[1])
|
52
52
|
when 'u', 'up', 'upload' then OUTPUT[index] = session.up(ARGV[1], ARGV[2])
|
53
53
|
when 'd', 'dl', 'download' then OUTPUT[index] = session.dl(ARGV[1], ARGV[2])
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: tinyssh
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 21
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 0
|
9
|
-
-
|
10
|
-
version: 0.0.
|
9
|
+
- 5
|
10
|
+
version: 0.0.5
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- William Herry
|