Data Source - SCP File Retrieval Method

Paulo Praxedes2
Giga Contributor

Hi, everyone!

   I have a problem with the consuming, by datasource, csv files for scp file retrieval.

  Explaining my scenario:

  I've a Midserver (version london-06-27-2018__patch0-07-11-2018_07-14-2018_1223), with host Linux. It's installed in my internal network and operacional (image below)

find_real_file.png

Into Configuration Parameter, I updated 2 configurations about DNS properties (Default Name Server & Additional Name Servers) with DNS's IP network server.

After that, I created a datasource for the Mid Server, using SCP file retrieval (associating valid credentials & valid file path) 

find_real_file.png

When I click in "Test Load 20 Records", I receive a message error (com.glide.db.impex.datasource.DataSourceException: java.io.IOException: SSH authentication failed, Failed to connect TCP: Connection refused). However, when I logged into Mid Server, by E.G. putty app, and try consuming file, using ssh client, simulating the expected, no problems are visualized.

Someone, Can help me a resolve this problem or guide me in the better way?

7 REPLIES 7

Dave Smith1
ServiceNow Employee
ServiceNow Employee

Good chance that the root account is prevented from remote logins - most *nix servers have that on by default.  I'm not certain if your explanation there indicates you tried connecting to the remote target or the MID using the credentials provided.

I'd also recommend setting up a low-privileged account if all you want to do is pull data off that server - get that connectivity working first and consider switching to using keys for tighter security.  Direct root logins violates plenty of security policies and is considered bad practice!

Rahul, tks for your comment! But, did not works. I'm studying more for resolve this issue.

Dave, tks for your comment.
I'm studying this datasource or this implementation because in my real scenare, i will take some csv files stored in any path of network.
The credentials informed are be able to connect, including this credentials, locally into midserver was installed, obtaining the files normally. But when I use "the same method" using the datasource component, an error are visualized.

Rahul Shandily3
Giga Guru

Hi there,

 

Please use the following workarounds and see if it fixes your issue.

  • Use absolute paths.
  • Prepend "./" to the relative path.
  • Use j2ssh.

J2SSH can be used by setting the property com.glide.sftp.use_snc to false

 

Hope it helps.

 

Best Regards,

Rahul

Please mark this as Correct or Helpful if it resolves your query.