0

I have problems when trying to transfer data from my local machine to cloud server (Amazon lightsail). My idea was to transfer data from local machine with scp command using private key. However I got error message:

ssh: connect to host my_public_IP port 22: Connection timed out lost connection

Then I tried just ssh command:

ssh -i /lightsail_key.pem Administrator@my_public_IP

and got same error.

Is "Administrator" correct username that I should use? My Amazon Lightsail instance is Windows Server 2016

I'm able to ping that public IP address but the SSH connection is not working.

SSH TCP port 22 is enabled in Amazon Lightsail Networking settings IPv4 Firewall rules.

0

Windows don't come with ssh server installed by default.

If you want to transfer files from your local machine to your Lightsail instance, using scp (or WinScp), you need to:

  • make sure you have an ssh server installed on your instance
  • SSH port is allowed for your IP address on the Security Group

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.