bcome 0.0.4 → 0.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/bcome/version.rb +1 -1
- data/lib/helpers/instance_ssh.rb +5 -1
- data/lib/stack/environment.rb +4 -0
- 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: 2d630f53472c53d7e8aeaddc8ed421f9c33d96c5
|
4
|
+
data.tar.gz: ddea85eff27d16001e97f1fb016db46f70b8eb94
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5f0f90ec257345ec95812c03d8e062bb7a3b5debe6c0e8d5ef34105bfaf7e348c7711746e2f5621c326b177ab67aa1df75fbc4429253154998156b213291f861
|
7
|
+
data.tar.gz: 5d4313c37b3836df5cedddf5e7094951bfe985e02d28884aa725106669a9f6112307dcec8e07ebca8e6477f2b4ef0672e1f27fc850f84ef40554b97a4982c2e2
|
data/lib/bcome/version.rb
CHANGED
data/lib/helpers/instance_ssh.rb
CHANGED
@@ -23,13 +23,17 @@ module ::Bcome::InstanceSsh
|
|
23
23
|
end
|
24
24
|
|
25
25
|
def ssh_jump_command_to_internal_node
|
26
|
-
command = "ssh -o UserKnownHostsFile=/dev/null -i #{ssh_key_path} -o \"ProxyCommand ssh -W %h:%p -i #{ssh_key_path} #{
|
26
|
+
command = "ssh -o UserKnownHostsFile=/dev/null -i #{ssh_key_path} -o \"ProxyCommand ssh -W %h:%p -i #{ssh_key_path} #{nat_user}@#{bastion_ip_address}\" #{ssh_user}@#{ip_address}"
|
27
27
|
end
|
28
28
|
|
29
29
|
def direct_ssh_command
|
30
30
|
command = "ssh #{environment.ssh_mode_user}@#{public_ip_address}"
|
31
31
|
end
|
32
32
|
|
33
|
+
def nat_user
|
34
|
+
return @environment.ssh_nat_user ? @environment.ssh_nat_user : ssh_user
|
35
|
+
end
|
36
|
+
|
33
37
|
def ssh_user
|
34
38
|
# defined by the environment or we fall back to the local user
|
35
39
|
return @environment.ssh_mode_user ? @environment.ssh_mode_user : `whoami`.gsub("\n","")
|
data/lib/stack/environment.rb
CHANGED