# Connecting To SFTP with Private Key

**URL:** <https://forum.cloverdx.com/t/connecting-to-sftp-with-private-key/1382>\
**Category:** CloverDX Platform\
**Created:** [April 8, 2014, 12:00am UTC](https://forum.cloverdx.com/t/connecting-to-sftp-with-private-key/1382 "2014-04-08T00:00:00Z")\
**Posts on this page:** 16\
**Page:** 2

<div class="post-metadata">

**Author:** ![slechtaj](https://avatars.discourse-cdn.com/v4/letter/s/59ef9b/32.png) [@slechtaj](https://forum.cloverdx.com/u/slechtaj)\
**Post date:** [April 25, 2014, 8:29am UTC](https://forum.cloverdx.com/t/connecting-to-sftp-with-private-key/1382/21 "2014-04-25T08:29:18Z")

</div>

Hi DTaylor,

What I wanted to test is whether you are able to connect to the remote server from the machine where your CloverETL Server is installed (in order to rule out the possibility of blocking by firewall). Can you please try this?

Thanks.

---

<div class="post-metadata">

**Author:** ![dtaylor](https://avatars.discourse-cdn.com/v4/letter/d/ee7513/32.png) [@dtaylor](https://forum.cloverdx.com/u/dtaylor)\
**Post date:** [April 25, 2014, 2:47pm UTC](https://forum.cloverdx.com/t/connecting-to-sftp-with-private-key/1382/22 "2014-04-25T14:47:13Z")

</div>

I installed FileZilla on the virtual machine where the CloverETL Server is installed and was able to connect to the SFTP site just fine with the key file.

---

<div class="post-metadata">

**Author:** ![imriskal](https://avatars.discourse-cdn.com/v4/letter/i/b38774/32.png) [@imriskal](https://forum.cloverdx.com/u/imriskal)\
**Post date:** [April 28, 2014, 12:23pm UTC](https://forum.cloverdx.com/t/connecting-to-sftp-with-private-key/1382/23 "2014-04-28T12:23:11Z")

</div>

Hello DTaylor,

Thank you for all your testing. I have another one for you if I may:

1. Download the file (graph) attached to this post.[EnableJSchLogging.grf](https://cdn.cloverdx.com/forum/16493%5Fe0e631fad3ab6410918ffdc89df0848b/EnableJSchLogging.grf)
2. Copy the graph into your CloverETL Server sandbox.
3. Run it. The graph enables logging of jsch library which handles sftp connections.
4. If it finishes successfully, please run your original graph with log level set to DEBUG.
5. Send me the whole log file of the original graph run with confidential information omitted as before.

The logging is enabled until CloverETL Server is restarted. If you wanted to disable it without restart, please let me know and we will prepare similar graph for this task.

By the way, if you have troubles with upload of some file types, please zip them into one package and upload the zip.

Thanks for your cooperation.

- [EnableJSchLogging.grf](https://cdn.cloverdx.com/forum/16493%5Fe0e631fad3ab6410918ffdc89df0848b/EnableJSchLogging.grf)

---

<div class="post-metadata">

**Author:** ![dtaylor](https://avatars.discourse-cdn.com/v4/letter/d/ee7513/32.png) [@dtaylor](https://forum.cloverdx.com/u/dtaylor)\
**Post date:** [April 28, 2014, 1:54pm UTC](https://forum.cloverdx.com/t/connecting-to-sftp-with-private-key/1382/24 "2014-04-28T13:54:19Z")

</div>

Okay, here’s the log file.

- [DebugLog.zip](https://cdn.cloverdx.com/forum/17432%5Fd498dcec994ce30e5ed95213412862a6/DebugLog.zip)

---

<div class="post-metadata">

**Author:** ![imriskal](https://avatars.discourse-cdn.com/v4/letter/i/b38774/32.png) [@imriskal](https://forum.cloverdx.com/u/imriskal)\
**Post date:** [April 29, 2014, 9:01am UTC](https://forum.cloverdx.com/t/connecting-to-sftp-with-private-key/1382/25 "2014-04-29T09:01:51Z")

</div>

Thanks. The log file unfortunately does not contain any explanation of the unsuccessful login. Key authentication is tried as the first option but it fails without any error message.

Could you please send an information about:

1. Operating system of the machine with CloverETL Server
2. Version of CloverETL Server and Designer
3. Version of Java used on the machine with CloverETL Server
4. Version of Java used on the machine with CloverETL Designer

And could you please try to install CloverETL Designer on the same machine as CloverETL Server is installed? Just for the purpose of this test, then you can delete it. Is this new Designer instance able to connect to SFTP?

---

<div class="post-metadata">

**Author:** ![dtaylor](https://avatars.discourse-cdn.com/v4/letter/d/ee7513/32.png) [@dtaylor](https://forum.cloverdx.com/u/dtaylor)\
**Post date:** [April 29, 2014, 1:19pm UTC](https://forum.cloverdx.com/t/connecting-to-sftp-with-private-key/1382/26 "2014-04-29T13:19:23Z")

</div>

1. Windows Server 2008 R2 Enterprise
2. Clover Server: 3.5.0.57/57, Designer: 3.5.0.58
3. Server Java Version: Java 6 (64-bit)
4. Designer Java Version: Java 7 (64-bit)

I can try to install the designer, but that will take a while as I will have to set up the database connections and the Clover projects to run the graph and I’ve already burned quite a bit of time trying to figure this issue out, so I’m dealing with other priorities now. I’ve connected to SFTP from this server before, just never with certificate authentication. It’s always been username and password with our other SFTP connections. I’ll get back to you later after I’ve been able to install the designer.

---

<div class="post-metadata">

**Author:** ![imriskal](https://avatars.discourse-cdn.com/v4/letter/i/b38774/32.png) [@imriskal](https://forum.cloverdx.com/u/imriskal)\
**Post date:** [April 30, 2014, 2:25pm UTC](https://forum.cloverdx.com/t/connecting-to-sftp-with-private-key/1382/27 "2014-04-30T14:25:44Z")

</div>

That would be great, thanks.

Ad 3) and 4) The different versions of Java may be the cause this issue. If there were some changes or improvements between versions 6 and 7 in this matter, it would explain why you are able to connect using Designer with Java 7 and unable to connect with Server using Java 6. If it is possible, try to run Server with exactly the same version of Java as your Designer uses.

Regards,

---

<div class="post-metadata">

**Author:** ![dtaylor](https://avatars.discourse-cdn.com/v4/letter/d/ee7513/32.png) [@dtaylor](https://forum.cloverdx.com/u/dtaylor)\
**Post date:** [April 30, 2014, 3:21pm UTC](https://forum.cloverdx.com/t/connecting-to-sftp-with-private-key/1382/28 "2014-04-30T15:21:12Z")

</div>

If I wanted to update the Server’s Java version is there any precautions I should take (like stopping the server) or should an update-in-place be okay?

---

<div class="post-metadata">

**Author:** ![slechtaj](https://avatars.discourse-cdn.com/v4/letter/s/59ef9b/32.png) [@slechtaj](https://forum.cloverdx.com/u/slechtaj)\
**Post date:** [May 2, 2014, 12:26pm UTC](https://forum.cloverdx.com/t/connecting-to-sftp-with-private-key/1382/29 "2014-05-02T12:26:10Z")

</div>

In this case you should shut down your CloverETL Server. You should also make sure that Server uses the new Java – that means JAVA\_HOME property should point to a directory where the new Java is installed. This property can be either set as environmental variable, or directly in your Tomcat Server configuration.

---

<div class="post-metadata">

**Author:** ![dtaylor](https://avatars.discourse-cdn.com/v4/letter/d/ee7513/32.png) [@dtaylor](https://forum.cloverdx.com/u/dtaylor)\
**Post date:** [May 20, 2014, 2:18pm UTC](https://forum.cloverdx.com/t/connecting-to-sftp-with-private-key/1382/30 "2014-05-20T14:18:59Z")

</div>

I finally got more time to work more on this. I installed Java 7 on the Clover Server and pointed Tomcat at it. I still received the same issue.

I installed CloverETL Designer 3.5.0 on the server and set the graph up in a test project with its connections and parameter files. I was able to run and connect to the SFTP without a problem through the designer. So it appears to be something with CloverETL Server itself.

---

<div class="post-metadata">

**Author:** ![imriskal](https://avatars.discourse-cdn.com/v4/letter/i/b38774/32.png) [@imriskal](https://forum.cloverdx.com/u/imriskal)\
**Post date:** [May 22, 2014, 2:00pm UTC](https://forum.cloverdx.com/t/connecting-to-sftp-with-private-key/1382/31 "2014-05-22T14:00:51Z")

</div>

Are you sure CloverETL Server really accepted your setting and used the correct version of Java? Could you please copy+paste and post the value you see in Configuration → System Info → System properties → java.home?

And the other important thing, is your keystore set correctly in CloverETL Server configuration? Could you please post (without passwords) also your certificate setting for both CloverETL Designer and CloverETL Server and the value of Configuration → System Info → JVM → Input arguments passed to the Java virtual machine?

Thanks,

---

<div class="post-metadata">

**Author:** ![dtaylor](https://avatars.discourse-cdn.com/v4/letter/d/ee7513/32.png) [@dtaylor](https://forum.cloverdx.com/u/dtaylor)\
**Post date:** [May 22, 2014, 7:12pm UTC](https://forum.cloverdx.com/t/connecting-to-sftp-with-private-key/1382/32 "2014-05-22T19:12:04Z")

</div>

> Are you sure CloverETL Server really accepted your setting and used the correct version of Java? Could you please copy+paste and post the value you see in Configuration → System Info → System properties → java.home?
> 
> “imriskal”

C:\Program Files\Java\jdk1.7.0\_55\jre

> And the other important thing, is your keystore set correctly in CloverETL Server configuration? Could you please post (without passwords) also your certificate setting for both CloverETL Designer and CloverETL Server and the value of Configuration → System Info → JVM → Input arguments passed to the Java virtual machine?

Where would I find the keystore setting and the certificate setting?

Input Arguments:

```auto
[-Dcatalina.base=C:\apache-tomcat-6.0.35, -Dcatalina.home=C:\apache-tomcat-6.0.35, -Djava.endorsed.dirs=C:\apache-tomcat-6.0.35\endorsed, -Djava.io.tmpdir=E:\sgi-dev\tomcat_tmp, -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager, -Djava.util.logging.config.file=C:\apache-tomcat-6.0.35\conf\logging.properties , -XX:MaxPermSize=512m, -Dverbose:gc , -XX:MaxDirectMemorySize=256m, -Dcom.sun.management.jmxremote, -Dcom.sun.management.jmxremote.port=8080, -Dcom.sun.management.jmxremote.ssl=false, -Dcom.sun.management.jmxremote.authenticate=false, -Djava.rmi.server.hostname=<Removed IP Address>, -XX:+UseConcMarkSweepGC, -XX:+CMSClassUnloadingEnabled, -XX:+CMSPermGenSweepingEnabled, -Xms128m, -Xmx6144m]

```

---

<div class="post-metadata">

**Author:** ![slechtaj](https://avatars.discourse-cdn.com/v4/letter/s/59ef9b/32.png) [@slechtaj](https://forum.cloverdx.com/u/slechtaj)\
**Post date:** [May 26, 2014, 2:34pm UTC](https://forum.cloverdx.com/t/connecting-to-sftp-with-private-key/1382/33 "2014-05-26T14:34:47Z")

</div>

Hi DTaylor,

Thank you for the information. We have added some extra logging into the library, so now we will get more information that should help us finding the cause. In order to update reach this, I would like to do the following steps:  
Replace JSch library (_jsch-0.1.50.jar_) from your CloverETL Server installation with the attached jar file. The library is located under \<TOMCAT\_HOME\>/webapps/clover/WEB-INF/lib/  
Restart your Tomcat server.  
Run attached _EnableJSchLoggingFixed.grf_  
Run your graph in DEBUG mode.  
After you run the graph, please share the resulting log with us.

Thanks

- [Update.zip](https://cdn.cloverdx.com/forum/16494%5F613b42359fe8d4381bbdbc3fa6fc36d4/Update.zip)

---

<div class="post-metadata">

**Author:** ![dtaylor](https://avatars.discourse-cdn.com/v4/letter/d/ee7513/32.png) [@dtaylor](https://forum.cloverdx.com/u/dtaylor)\
**Post date:** [July 24, 2014, 1:34pm UTC](https://forum.cloverdx.com/t/connecting-to-sftp-with-private-key/1382/34 "2014-07-24T13:34:40Z")

</div>

This has been resolved and I’ll own up to my idiocy. Somehow an extra character had made it’s way into the parameter I use for the address. This extra character was on the username (an asterisk for the curious) and I overlooked it repeatedly whenever I looked at it. Thanks for your help.

---

<div class="post-metadata">

**Author:** ![sammy66](https://avatars.discourse-cdn.com/v4/letter/s/5fc32e/32.png) [@sammy66](https://forum.cloverdx.com/u/sammy66)\
**Post date:** [July 30, 2014, 11:59am UTC](https://forum.cloverdx.com/t/connecting-to-sftp-with-private-key/1382/35 "2014-07-30T11:59:55Z")

</div>

I don’t know how to get the stack trace. I get this error when trying to validate the connection during connection setup. It tells me it couldn’t connect and lists that exception as the reason. But that’s all it says, it doesn’t actually present me with a stack trace.

---

<div class="post-metadata">

**Author:** ![dtaylor](https://avatars.discourse-cdn.com/v4/letter/d/ee7513/32.png) [@dtaylor](https://forum.cloverdx.com/u/dtaylor)\
**Post date:** [July 30, 2014, 12:56pm UTC](https://forum.cloverdx.com/t/connecting-to-sftp-with-private-key/1382/36 "2014-07-30T12:56:32Z")

</div>

Earlier in the thread, they determined that there is actually a bug when trying to use connection setup to test a connection with a private key.

[Previous page](https://forum.cloverdx.com/t/connecting-to-sftp-with-private-key/1382.md?page=1)
