ssh-manager 1.0.4 → 1.0.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/ssh/manager/cli.rb +9 -5
- data/lib/ssh/manager/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e5af85955007e2593df5116944b84b2717970120
|
4
|
+
data.tar.gz: e351a66da23b679499a4bf02ca6cbe419574d406
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 62898e31deff1153afb52b62b57daed6cf9345cf1b0b32daf14568f5cfa8421a972e6cdeb7d5d0ccfa86331330d247cde3d9e2a6dd95642add24ac12140df995
|
7
|
+
data.tar.gz: f71c40faa623b177c278621f926bc27591bdf9fda204a49aa94518392e6cf24083209d9909d1441b9d5c6d3625ae8123ee8a23006473d34589c773868e426f75
|
data/lib/ssh/manager/cli.rb
CHANGED
@@ -14,7 +14,7 @@ module SSH
|
|
14
14
|
@options = opts
|
15
15
|
end
|
16
16
|
|
17
|
-
def check_term(ip, user)
|
17
|
+
def check_term(ip, user, via)
|
18
18
|
if CONFIG['terminal'] == "xfce4-terminal" || CONFIG['terminal'] == "gnome-terminal"
|
19
19
|
if CONFIG['tabbed'] == 'true'
|
20
20
|
command = "--title=#{user}@#{ip} --tab --command="
|
@@ -24,7 +24,11 @@ module SSH
|
|
24
24
|
#TODO: add title --title='connection name to identify '
|
25
25
|
#TODO: bug when no terminal is open => wants to open 2 terms
|
26
26
|
#TODO: dnslookup
|
27
|
-
|
27
|
+
if via.nil?
|
28
|
+
%x(#{CONFIG['terminal']} #{command}"ssh #{user}@#{ip}")
|
29
|
+
else
|
30
|
+
%x(#{CONFIG['terminal']} #{command}"ssh -A -t #{via} ssh -A -t #{user}@#{ip}")
|
31
|
+
end
|
28
32
|
elsif CONFIG['terminal'] == "xterm" || CONFIG['terminal'] == "urxvt"
|
29
33
|
%x(#{CONFIG['terminal']} -e "ssh #{user}@#{ip}")
|
30
34
|
else
|
@@ -38,12 +42,12 @@ module SSH
|
|
38
42
|
if via.nil?
|
39
43
|
@ip = DATABASE.get_connection_data[id.to_i-1][0]
|
40
44
|
@user = DATABASE.get_connection_data[id.to_i-1][1]
|
41
|
-
check_term(@ip, @user)
|
45
|
+
check_term(@ip, @user, via)
|
42
46
|
else
|
43
47
|
@ip = DATABASE.get_connection_data[id.to_i-1][0]
|
44
48
|
@user = DATABASE.get_connection_data[id.to_i-1][1]
|
45
49
|
via = DATABASE.get_connection_data[id.to_i-1][-1]
|
46
|
-
|
50
|
+
check_term(@ip, @user, via)
|
47
51
|
end
|
48
52
|
#TODO: check for options
|
49
53
|
#TODO: if db[secure_login] = false => http://linuxcommando.blogspot.de/2008/10/how-to-disable-ssh-host-key-checking.html
|
@@ -151,7 +155,7 @@ module SSH
|
|
151
155
|
def multiple_connection(term)
|
152
156
|
DATABASE.search_for(term).each do |x|
|
153
157
|
x.all.each do |dataset|
|
154
|
-
check_term(dataset[:ip], dataset[:user])
|
158
|
+
check_term(dataset[:ip], dataset[:user], dataset[:connect_via])
|
155
159
|
#TODO: Add terminalposition
|
156
160
|
end
|
157
161
|
end
|
data/lib/ssh/manager/version.rb
CHANGED