Class: ProxyAPI::RemoteExecutionSSH
- Inherits:
-
Resource
- Object
- Resource
- ProxyAPI::RemoteExecutionSSH
- Defined in:
- app/lib/proxy_api/remote_execution_ssh.rb
Instance Method Summary collapse
- #drop_from_known_hosts(hostname) ⇒ Object
-
#initialize(args) ⇒ RemoteExecutionSSH
constructor
A new instance of RemoteExecutionSSH.
- #pubkey ⇒ Object
Constructor Details
#initialize(args) ⇒ RemoteExecutionSSH
Returns a new instance of RemoteExecutionSSH.
3 4 5 6 |
# File 'app/lib/proxy_api/remote_execution_ssh.rb', line 3 def initialize(args) @url = args[:url] + '/ssh' super args end |
Instance Method Details
#drop_from_known_hosts(hostname) ⇒ Object
14 15 16 17 18 |
# File 'app/lib/proxy_api/remote_execution_ssh.rb', line 14 def drop_from_known_hosts(hostname) delete('known_hosts/' + hostname) rescue => e raise ProxyException.new(url, e, N_('Unable to remove host from known hosts')) end |
#pubkey ⇒ Object
8 9 10 11 12 |
# File 'app/lib/proxy_api/remote_execution_ssh.rb', line 8 def pubkey get('pubkey').strip rescue => e raise ProxyException.new(url, e, N_('Unable to fetch public key')) end |