title: SSH Configuration with WebSphere and Spring Integration
body: <p>I have a Web application (Spring MDP) hosted on WebSphere that listens to a messages and generates some text files  on 3 different servers (Unix boxes) using SFTP. We are using Spring integration (DefaultSftpSessionFactory) to establish the SFTP connectivity and write the files to the different servers using user credentials (username/password) for the target hosts.</p>
  
  <p>Now, as per the new requirement, we have to stop using the username/password to connect to the servers and use the SSH key pair instead. We have been given a direction that we have to use the SSH key for 'wasadm' user to establish the connectivity. Here's what I have done so far:</p>
  
  <ol>
  <li>Got the public key for 'wasadm' user from WAS Admin team.</li>
  <li>Got the public key installed to the different server's authorized keys.</li>
  </ol>
  
  <p>Now, my question is that - How do I configure my application so that it picks up the 'wasadm' SSH private key for connecting to the target boxes. (The private key is at the location '/home/wasadmin/.ssh'. Is this directory accessible by the EAR application? If yes, how do I configure the DefaultSftpSessionFactory to use this private key for authentication).</p>
  
  <p>Any pointers and guidance is greatly appreciated. </p>
  
  <p>Thanks a lot.</p>
  
  <p>-Ashish</p>