2
3
4
5
6
7
8
9
10
|
# File 'lib/vagrant_commands/scp.rb', line 2
def self.execute_command(from_file,to_file,box_name)
portNum = get_ssh_details(/(?<=Port ).*/,box_name)
keyPath = get_ssh_details(/(?<=IdentityFile ).*/,box_name)
hostName = get_ssh_details(/(?<=HostName ).*/,box_name)
userName = get_ssh_details(/(?<=User ).*/,box_name)
puts "scp -o 'StrictHostKeyChecking no' -i #{keyPath} -P #{portNum} #{from_file} #{userName}@#{hostName}:#{to_file}"
`scp -o 'StrictHostKeyChecking no' -i #{keyPath} -P #{portNum} #{from_file} #{userName}@#{hostName}:#{to_file}`
end
|