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.3.1'
Class Method Summary collapse
Class Method Details
.private_key_file ⇒ Object
24 25 26 |
# File 'lib/smart_proxy_remote_execution_ssh.rb', line 24 def private_key_file File.(Plugin.settings.ssh_identity_key_file) end |
.public_key_file ⇒ Object
28 29 30 |
# File 'lib/smart_proxy_remote_execution_ssh.rb', line 28 def public_key_file File.("#{private_key_file}.pub") end |
.validate! ⇒ Object
9 10 11 12 13 14 15 16 17 18 19 20 21 22 |
# File 'lib/smart_proxy_remote_execution_ssh.rb', line 9 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 |