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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: bae04d01539a4942368e8ed92e65e2b712c7e40c
4
- data.tar.gz: a653408283b84ab48557156da1ff54aa43ce0711
3
+ metadata.gz: e5af85955007e2593df5116944b84b2717970120
4
+ data.tar.gz: e351a66da23b679499a4bf02ca6cbe419574d406
5
5
  SHA512:
6
- metadata.gz: 7a4b9ed662ba509680dde00e147f3d85025c655a0a004c5648a23fa0a140c4cf24f867ef85acf853301a2851b7d269ec99ad66f96f7383e031fb6a7b221c5aaa
7
- data.tar.gz: 18ef55d2787eae8c57762ccf3a4c5f682adc13e40c6906d56f15f3fcf1b3f7282393b0b6e4927b7db7b505283dcbb6281f2aac74d68281bea63fadf7fd7d8c64
6
+ metadata.gz: 62898e31deff1153afb52b62b57daed6cf9345cf1b0b32daf14568f5cfa8421a972e6cdeb7d5d0ccfa86331330d247cde3d9e2a6dd95642add24ac12140df995
7
+ data.tar.gz: f71c40faa623b177c278621f926bc27591bdf9fda204a49aa94518392e6cf24083209d9909d1441b9d5c6d3625ae8123ee8a23006473d34589c773868e426f75
@@ -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
- %x(#{CONFIG['terminal']} #{command}"ssh #{user}@#{ip}")
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
- %x(gnome-terminal --command="ssh -A -t #{via} ssh -A -t #{@user}@#{@ip}")
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
@@ -1,5 +1,5 @@
1
1
  module SSH
2
2
  module Manager
3
- VERSION = "1.0.4"
3
+ VERSION = "1.0.5"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ssh-manager
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.4
4
+ version: 1.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Joshua Schmid