What you're actually looking for is what is called in Overthere a Jumpstation.
You want to connect like this: client -> Server A -> Server B
Using overthere you can setup that connection as follows:
ConnectionOptions jumpStationOptions = new ConnectionOptions();
jumpStationOptions.set(ConnectionOptions.ADDRESS, "Server A");
jumpStationOptions.set(ConnectionOptions.USERNAME, "Username A");
jumpStationOptions.set(ConnectionOptions.PASSWORD, "Password A");
jumpStationOptions.set(ConnectionOptions.PROTOCOL, "ssh-jumpstation");
jumpStationOptions.set(ConnectionOptions.OPERATING_SYSTEM, OperatingSystemFamily.UNIX);
ConnectionOptions options = new ConnectionOptions();
options.set(ConnectionOptions.PASSWORD, "Password B");
options.set(ConnectionOptions.USERNAME, "Username B");
options.set(ConnectionOptions.ADDRESS, "Server B");
options.set(ConnectionOptions.OPERATING_SYSTEM, OperatingSystemFamily.UNIX);
options.set(SshConnectionBuilder.CONNECTION_TYPE, SshConnectionType.SCP);
options.set(ConnectionOptions.JUMPSTATION, jumpStationOptions);
OverthereConnection connection = Overthere.getConnection(SshConnectionBuilder.SSH_PROTOCOL, options);
This setup will configure "Server A" to be used as a jumpstation to reach "Server B".