I'm trying to transfer files using the SCP protocol from my local system to another ssytem. I used the ip address, hostname, and password of the other system. But I'm getting an error:
Exception in component tSCPConnection_1 (SCP)
org.apache.sshd.common.SshException: DefaultConnectFuture[Username@/hostname:22]: Failed (IOException) to execute: The semaphore timeout period has expired.
at org.apache.sshd.common.future.AbstractSshFuture.lambda$verifyResult$1(AbstractSshFuture.java:132)
at org.apache.sshd.common.future.AbstractSshFuture.formatExceptionMessage(AbstractSshFuture.java:190)
at org.apache.sshd.common.future.AbstractSshFuture.verifyResult(AbstractSshFuture.java:131)
at org.apache.sshd.client.future.DefaultConnectFuture.verify(DefaultConnectFuture.java:42)
at org.apache.sshd.client.future.DefaultConnectFuture.verify(DefaultConnectFuture.java:34)
at org.apache.sshd.common.future.VerifiableFuture.verify(VerifiableFuture.java:43)
at project1.scp_0_1.SCP.tSCPConnection_1Process(SCP.java:987)
at project1.scp_0_1.SCP.tPrejob_1Process(SCP.java:840)
at project1.scp_0_1.SCP.runJobInTOS(SCP.java:2549)
at project1.scp_0_1.SCP.main(SCP.java:2258)
Caused by: java.io.IOException: The semaphore timeout period has expired.
The connection isn't getting established. what am I missing here?