How to download file from ssh ec2
Note: To avoid getting charged after you have used up the free tier for EC2, either click Stop to have a lower cost, or Terminate to remove the instance and not be charged. Leave the password field empty, since we are using the private key for authentication. Port number is 22 for SFTP. Once you enter all the necessary details click connect. The local site is your local system files. The remote site is your server instance. To upload files choose the directory on your server where you want your files to be uploaded.
Few key things to understand, Since you are logging in as a user, you cannot upload the files to the root directory due to permissions issues. Alternatively, upload the files to the user home directory and copy it to the desired location using any ssh client like putty.
You will be uploading and downloading files as a normal user and not a root user. So the files which are owned by root cannot be uploaded and downloaded. You will get permission denied error when you try to download a file owned by root. For example, If you want to copy a whole folder, then you should use a recursive flag -r with the command as shown below.
I hope this article helps. Let me know in the comments section if you face any errors. Choose Services , then EC2. In the sidebar, click Instances. Click Launch Instance. Scroll down and choose Microsoft Windows Server Base. Asked 7 years, 9 months ago. Active 1 year, 8 months ago. Viewed 33k times. Improve this question. Ritesh Mehandiratta Ritesh Mehandiratta 6, 30 30 gold badges silver badges bronze badges.
Add a comment. Active Oldest Votes. Improve this answer. Hope it will be helpfull to someone. Dinesh Pallapa Dinesh Pallapa 1, 15 15 silver badges 19 19 bronze badges. Jackson Jackson 1, 1 1 gold badge 21 21 silver badges 52 52 bronze badges.
Thuvarahan Sivakumar Thuvarahan Sivakumar 4 4 silver badges 8 8 bronze badges. Sign up or log in Sign up using Google. Active 9 years, 5 months ago. Viewed 6k times. I connect to an ec2 instance via SSH. What options do I have to transfer files over to my linux box? Is there anything other than setting up an FTP server? I'm on a windows computer. Improve this question. Add a comment.
Active Oldest Votes. Download WinSCP and use the sftp functionality. It makes use of your ssh connection. Improve this answer. Alex Holst Alex Holst 2, 1 1 gold badge 14 14 silver badges 13 13 bronze badges. Use scp with the same arguments as ssh: scp -i key. This is how I do it on Ubuntu: sshfs ubuntu 1.