I tried to transfer a file from an HPC system to a remote CentOS system using the following command line:
scp /ANKAN/data/abc.pdf [email protected]:/data/ANKAN
But I am getting the following error:
ssh: connect to host 192.168.69.231 port 22: Connection refused lost connection
I tried all the commands given in the How to Fix the SSH “Connection Refused” Error webpage at phoenixNAP knowledge base, but nothing worked!
For your information, the port number of the HPC (from where I am transferring the files) is 4422. But when I gave the following command in the remote CentOS system:
sudo grep Port /etc/ssh/sshd_config
the following lines are printed:
Port 22
#GatewayPorts no
So, I tried using the following command lines:
scp -P 4422 /ANKAN/data/abc.pdf [email protected]:/data/ANKAN
and
scp -P 22 /ANKAN/data/abc.pdf [email protected]:/data/ANKAN
But I am getting the same errors. I can't figure out what is going wrong here. Can anyone please help me to solve this issue?