Skip to Content

This is the forth and final post in the series “SFTP Adapter – Installing SFTP Server on Windows”.  If you have not read the previous posts, you can refer the below links.

SFTP Adapter – Installing SFTP Server on Windows – Part 01

SFTP Adapter – Installing SFTP Server on Windows – Part 02

SFTP Adapter – Installing SFTP Server on Windows – Part 03

This post describes the steps to test the localhost SFTP server using private key based authentication feature which available in SFTP Adapter which is a part of Secure Connectivity add-on.

     31. create view.PNG

  • Click on “Create” which is under “View Entries” Tab
  • Provide the Entry Name (e.g. mykey)
  • Select the “Store Certificate” option
  • Click on “Next”

   32. create keys page 01.PNG

  • Provide the common name (e.g. mykey)
  • Click on “Finish”

33. create keys page 02.PNG

  • Select the certificate entry (e.g. mykey-cert)
  • Click on “Export Entry”
  • Choose “Base 64 x.509”
  • Click on “Download” link

34. export certifcate 01.PNG

  • Save the certificate in the user’s home directory

35. save in home dir.PNG

36. convert the certificate ssl to ssh.PNG

  • Convert the SSH key into OpenSSH key format using ssh-keygen utility
    • $ ssh-keygen -i -m PKCS8 -f mykey.pkey > mykey.ssh.pkey

37. ssh key to openssh format.PNG

  • Add/Append the content of the OpenSSH key to “~/.ssh/authrorized_keys” file
  • $ cat mykey.ssh.pkey > .ssh/authorized_keys
  • Verify the read access

38. append it to authroized keys.PNG

  • Modify the SFTP sender channel configuration to use the above created private key

39. channel config private key.PNG

  • Activate & Start the channel. The channel short logs should look like below

40. channel short los.PNG

The above logs shows that it can able to successfully connect to the SFTP server using the configured private key and downloaded the file.

That’s end the series. Cheers

To report this post you need to login first.

1 Comment

You must be Logged on to comment or reply to a post.

  1. Sudhansukumar Behera

    Hi,

    Thanks for sharing the blog.

    I am receiving the following error while using private key authentication in the sender SFTP adapter.

    Exception received: com.jcraft.jsch.JSchException: java.io.IOException: inputstream is closed

    Any leads would be highly appreciated.

    PS: Using password based authentication i am able to successfully pick up files.

    Thanks,

    Sudhansu

    (0) 

Leave a Reply