Quantcast
Channel: Active questions tagged networking - Ask Ubuntu
Viewing all articles
Browse latest Browse all 23552

'Connection refused lost connection' error while using scp command

$
0
0

I tried to transfer a file from an HPC system to a remote system using the following command line:

scp /ANKAN/data/abc.pdf maslab-3@192.168.69.231:/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 webpage https://phoenixnap.com/kb/ssh-connection-refused, 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 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 maslab-3@192.168.69.231:/data/ANKAN

and

scp -P 22 /ANKAN/data/abc.pdf maslab-3@192.168.69.231:/data/ANKAN

But I am getting the same errors.

I asked the support team of that HPC system, and they informed us that the error was due to firewall restrictions. For some reason, the network is blocking data transfer from the remote system end. I can't figure out what is going wrong here. Can anyone please help me to solve this issue?


Viewing all articles
Browse latest Browse all 23552

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>