class SshUtils implements InitializingBean {

    public void sendFileToHost(File localfilePath, String remoteFileName, String remotePath, String address) {
        Connection sshConnectionWithHost = getSshConnectionWithHost(address);
        try {
            authenticateSshSessionWithPublicKey(sshConnectionWithHost);
            SCPClient scp = new SCPClient(sshConnectionWithHost);
            scp.put(localfilePath.getAbsolutePath(), remoteFileName, remotePath, "0755");
        } catch (IOException e) {
            logger.error(String.format("Error while sending file [%s] to host [%s]", localfilePath, address), e);
        }
        sshConnectionWithHost.close();
    }

}