Hope you are doing good.
The reason why you are not able to connect to the Remote Server is you are giving the wrong IP address. We have created the blog to transfer the file to the Remote Server, please refer to the below link:
Note : In Step 2 please use the below details instead of which mentioned in the Blog:
Password: ‘Blank’ as AWS EC2 uses Key based authentication
Port Number: 22
Please try this and let us know if you face any issue.