- From: Brad Knowles <
>
- To:
- Cc: Bradford L Knowles <
>
- Subject: [chef] Why am I getting this error from net-scp?
- Date: Tue, 25 Nov 2014 21:11:51 -0600
Folks,
So, I'm doing some compliance work for a customer (not PCI, but similar), and
one thing we decided was to use scp to upload and download large files from a
central fileserver. This way we don't have to worry about opening any more
holes in firewalls (because ssh already has to be open), no additional
Pandoras Boxes, etc....
The download works fine. But when I'm trying to upload the results of the
scan, it bombs out. The weird thing is that the code uses Mixlib::ShellOut
to go find the file in question just a few lines above, but then Net:Scp
craps out.
A slice of logs showing the error message is at
<
http://pastebin.com/YXPu4TKS>.
I haven't done the Windows side of the code yet, but the Linux part of the
code for this section looks like this:
if platform_family?("rhel")
ruby_block 'find-and-upload-ciscat-results' do
block do
require 'mixlib/shellout'
require 'net/scp'
cmd = Mixlib::ShellOut.new("find #{resdir} -name '*.xml' | sort |
tail -1")
cmd.run_command
cmd.error!
source = cmd.stdout
Chef::Log.debug("Uploading source file #{source} to
:#{target}")
Net::SCP.upload!(host, user, source, target, :ssh => { :password =>
pass })
end
end
# elsif platform_family?("windows")
end
Am I doing something incredibly stupid here?
--
Brad Knowles
<
>
LinkedIn Profile: <
http://tinyurl.com/y8kpxu>
Attachment:
signature.asc
Description: Message signed with OpenPGP using GPGMail
- [chef] Why am I getting this error from net-scp?, Brad Knowles, 11/25/2014
Archive powered by MHonArc 2.6.16.