Method: Mccloud::Provider::Aws::VmCommand#scp
- Defined in:
- lib/mccloud/provider/aws/vm/scp.rb
#scp(local_path, remote_path, scp_options = {}) ⇒ Object
9 10 11 12 13 14 15 16 17 18 |
# File 'lib/mccloud/provider/aws/vm/scp.rb', line 9 def scp(local_path, remote_path, = {}) unless File.exists?(local_path) raise Mccloud::Error,"scp failed: #{local_path} does not exist" end #@raw.scp(src,dest) [:key_data] = [@raw.private_key] if @raw.private_key ::Fog::SCP.new(self.ip_address, @raw.username, sanitize()).upload(local_path, remote_path, {}) end |