Module: Proxy::RemoteExecution::Ssh
- Defined in:
- lib/smart_proxy_remote_execution_ssh/version.rb,
lib/smart_proxy_remote_execution_ssh/plugin.rb,
lib/smart_proxy_remote_execution_ssh/api.rb,
lib/smart_proxy_remote_execution_ssh.rb
Defined Under Namespace
Constant Summary collapse
- VERSION =
'0.1.6'
Class Method Summary collapse
Class Method Details
.private_key_file ⇒ Object
23 24 25 |
# File 'lib/smart_proxy_remote_execution_ssh.rb', line 23 def private_key_file File.(Plugin.settings.ssh_identity_key_file) end |
.public_key_file ⇒ Object
27 28 29 |
# File 'lib/smart_proxy_remote_execution_ssh.rb', line 27 def public_key_file File.("#{private_key_file}.pub") end |
.validate! ⇒ Object
8 9 10 11 12 13 14 15 16 17 18 19 20 21 |
# File 'lib/smart_proxy_remote_execution_ssh.rb', line 8 def validate! unless private_key_file raise "settings for `ssh_identity_key` not set" end unless File.exist?(private_key_file) raise "Ssh public key file #{private_key_file} doesn't exist.\n"\ "You can generate one with `ssh-keygen -t rsa -b 4096 -f #{private_key_file} -N ''`" end unless File.exist?(public_key_file) raise "Ssh public key file #{public_key_file} doesn't exist" end end |