code: public void put(InputStream in, long length, String localFile,
  			String remoteFile, FileTransferProgress progress)
  			throws SshException, ChannelOpenException {
  
  		ScpEngineIO scp = new ScpEngineIO("scp -t " /* + (verbose ? "-v " : "") */
  				+ remoteFile, ssh.openSessionChannel());
  		try {
  
  			scp.waitForResponse();
  
  			if (progress != null) {
  				progress.started(length, remoteFile);
  			}
  
  			scp.writeStreamToRemote(in, length, localFile, progress);
  
  			if (progress != null)
  				progress.completed();
  
  			scp.close();
  		} catch (IOException ex) {
  			scp.close();
  			throw new SshException(ex, SshException.CHANNEL_FAILURE);
  		}
  	}
docs: <p>
  Uploads a <code>java.io.InputStream</code> to a remote server as a file.
  You <strong>must</strong> supply the correct number of bytes that will be
  written.
  </p>
  
  @param in
  stream providing file
  @param length
  number of bytes that will be written
  @param localFile
  local file name
  @param remoteFile
  remote file name
  @param progress
  a file transfer progress implementation
  
  @throws IOException
  on any error