Explore Courses Blog Tutorials Interview Questions
0 votes
in AWS by (12.9k points)

I use SSH to connect to my Ubuntu instance. With SSH I can administer files and folders on the instance, but how do I upload files and folders from my local machine to the instance?

Is it possible to do right from SSH session, without using SFTP clients?


1 Answer

+1 vote
by (18.2k points)
selected by
Best answer

You can use SCP or WinSCP to transfer files or folders to your EC2 instance.

For SCP, you need to  run the following command on your cmd of your local machine:

scp -i path/to/pem path/to/file username@PublicDNS/home/username

For WinSCP, download and install WinSCP tool and follow the below-mentioned steps:

1. Open WinSCP console and provide the required information such as Hostname (value: Public IP of your instance), the user name( value Amazon linux instance is ec2-user and value for ubuntu instance is ubuntu), then click on advanced.

3. A new window will be displayed. Select SSH from the left pane then select Authentication.

4. Browse and select your private key file then click ok then click login. When the dialog box pops up, click yes.

5. Now you just have to select files from the left pane(your local machine), drag and drop files on the right pane (your instance's home directory).

Do you want to master AWS, then do checkout the aws course training by Intellipaat.

Related questions

0 votes
1 answer

Want to get 50% Hike on your Salary?

Learn how we helped 50,000+ professionals like you !

Browse Categories