VMware Cloud Community
jamesbowling
VMware Employee
VMware Employee

SCP get Task

I am having an odd issue with the SCP get task in my workflow.  It seems that it starts the get but for some reason drops almost immediately with no error.  I have attempted a normal scp function from the vCO server and I am able to get the file with no issue.  When I try to get the file with the SCP get workflow it completes but only gets a portion of the file.  I am expecting a file that is about 400MB but when I execute the workflow I only receive about 2.3MB of the file.  Any help would be greatly appreciated.

James B. | Blog: http://www.vSential.com | Twitter: @vSential --- If you found this helpful then please awards helpful or correct points accordingly. Thanks!
0 Kudos
3 Replies
jamesbowling
VMware Employee
VMware Employee

Disregard this as it is working as expected now.  One thing that is odd is in order for the scp put to work I have to enable PasswordAuthentication in /etc/ssh/sshd_config.  If this is not set to yes then it doesn't work.

Does anyone know why this would need to be set?  Wouldn't we be able to pass authentication without enabling this?  The reason I ask is now I need to get each new host's sshd_config changed during the process in order to automate it.

James B. | Blog: http://www.vSential.com | Twitter: @vSential --- If you found this helpful then please awards helpful or correct points accordingly. Thanks!
0 Kudos
KiwiDave
Enthusiast
Enthusiast

Without looking too deep into it, it may be due to Orchestrator using SFTP for SCP file copy:

The SSH plug-in uses the Java JCraft library, which implements SFTP. The SCP get command workflow
transfers files by using SFTP.

We haven't started on our RHEL environment with Orchestrator so I can't do any further digging.

If you are running a large enough linux environment then you could use a config management solution (Puppet, cfengine, Spacewalk) then you just provision the server with Orchestrator and then your config mgmt takes over. (Although that is a different project to tackle).

dimitrovg
VMware Employee
VMware Employee

It is possible that some error occurs during the scp transffer (for example connection errors). Can you duplicate the SCP get workflow (or create new one) with adding an additional line that prints the output of the getError() method:

  var sshCmd = new SSHCommand(hostName,username,password) ;
  sshCmd.getFile(remoteFile,localFile) ;
  error = sshCmd.getError() ;
  System.error("error:" + error); // ** this is added

  sshCmd.disconnect();

Additionally check if there are errors in the vco log files.

Unfortunately I cannot reproduce this behavior. I tried simulating network problems but I did not succeed.

About the PasswordAuthentication configuration. This controls if users can login with password. If this is disabled then the users still can login with private/public key. vCO supports such kind of authentication. Please see SSHSession.connectWithIdentity()

Hope this helps.

George

0 Kudos