Module: TrainPlugins::Juniper::BastionProxy
- Includes:
- SshAskpass, WindowsProxy
- Included in:
- Connection
- Defined in:
- lib/train-juniper/connection/bastion_proxy.rb
Overview
Handles bastion host proxy configuration and authentication
Instance Method Summary collapse
-
#configure_bastion_proxy(ssh_options) ⇒ Object
Configure bastion proxy for SSH connection.
Methods included from SshAskpass
#create_ssh_askpass_script, #setup_bastion_password_auth
Methods included from WindowsProxy
#build_plink_proxy_command, #plink_available?
Instance Method Details
#configure_bastion_proxy(ssh_options) ⇒ Object
Configure bastion proxy for SSH connection
16 17 18 19 20 21 22 23 24 25 26 27 |
# File 'lib/train-juniper/connection/bastion_proxy.rb', line 16 def configure_bastion_proxy() bastion_user = [:bastion_user] || [:user] bastion_port = [:bastion_port] bastion_password = [:bastion_password] || [:password] # On Windows with password auth, use plink.exe if available if Gem.win_platform? && bastion_password && plink_available? configure_plink_proxy(, bastion_user, bastion_port, bastion_password) else configure_standard_proxy(, bastion_user, bastion_port) end end |