SFTP Access To Amazon EC2 Using FileZilla
As soon as you've setup a Linux instance on Amazon EC2 you're likely next step is to get FTP access so you can move files about.
If, like me, your FTP tool of choice is FileZilla then this tip might save you some of the time it took me to work it out.
First of all make sure port 22 is open in your instance's Security Group in Amazon's AWS site. You can test this from a Terminal using the following command:
ssh Address-Of-EC2-Instance
If that times out then most likely port 22 isn't open. Otherwise you're ok. SFTP uses the same port so we can carry on and set it up.
If at this point you try to connect using SFTP from FileZilla you'll probably see this:
The error is "No supported authentication methods available". To get round it you need to tell FileZilla about the .PEM file that was created when you built the Amazon instance. Assuming you already downloaded it to you PC, open FileZilla and select the Edit->Settings menu.
Click the "Add key file..." button and locate your PEM file. At this point FileZilla will ask if you want to convert it to a format it can use. Say yes and tell it where to put the new .PPK file. Once this is done press ok and try to connect again. You should have more luck!
Nice tip, but I'm even more interested in your EC2 opinion/experience in general.
Reply
Hmm. I find it all a bit confusing really. It's making me think that a vanilla hosting package might be the better option (for me at least). One where they just set it all up and give you an IP address and login and you know how much you'll be paying each month.
Even with the EC2 cost calculator I find it a bit daunting try to even get a rough idea what I might be spending each month.
Still, it's impressive what they've done. You just need a lot of time spare if you going to fully understand how to get the most out of it.
Reply
Show the rest of this thread
Hi Jake,
There is no stupid question um?
So... tell me:
- Is it possible to deploy Domino server/apps on Amazon EC2?
- Does it also mean that your "EC2 Apps" are then faster (for worldwide users) since they are replicated "everywhere" on the cloud?
Alex
Reply
Yes, you can deploy Domino server on EC2.
However, that doesn't mean they're automatically replicated to all of Amazon's data warehouse locations. When you choose to create an Amazon EC2 instance you choose where it will sit (East/West America or East/West Europe).
You could have them all around the world by creating separate instances of Domino servers at the various Amazon locations and then setting them to replicate to each other. I guess.
Reply
Hi, you definitely saved a lot of time. am a newbie just got my ec2 setup, when i tried to connect through an ftp client, i saw your post luckily and it worked like a magic.
Thanks
Reply
Thanks a lot. You saved my time :)
Reply
I am trying to upload an entire site that is built with PHP. I tried all your steps and I got this message
Connecting to My amazon instance ...
Response: fzSftp started
Command: keyfile "C:\Users\mmusleh\Downloads\Joomla25first.ppk"
Command: open "root@my amazon instance" 22
Status: Connected to my amazon instance
Error: Fatal: unable to initialise SFTP on server: could not connect
Error: Could not connect to server
What is your advice?
thanks
Saed
Reply
Saed try using ec2-user instead of root.
Reply
Jake, thank you for posting this.
Reply
Great!!! Tks
Reply
Jake. Very helpful. Thanks!
Reply
Anyone have advice here - I'm getting a simple "Conneciton timed out" error. What can I try to get this connect to work??
Status: Connecting to myec2instance.com...
Response: fzSftp started
Command: keyfile "S:\Administrative\AmazonCloud_ArcGIS\PEM_To_FileZilla.ppk"
Command: open "ec2-user@myec2instance.com" 22
Error: Connection timed out
Error: Could not connect to server
Any suggestion greatly appreciated!
Steve
Reply
probably your security group isn't setup to allow the connection
Reply
Worked with cyberduck (OSX) using the SFTP options and specifying the pem file.
This guide saved me the time I would have spent setting up the vsftp thing that I'm reading about elsewhere.
Thank god I stumbled upon this first before embarking on that dark journey.
Reply
wasn't working for me before even after I did all these steps.
I changed my username to root
works now. hope this helps someone.
Reply
Same issue as jim - it worked only when I changed username to root.
Reply
I can't get it to connect with any of the suggestions here - tho I get the same responses listed above. Used (as users) anonymous, root, ec2-user... no joy.
I'm NEW to this. I have checked and the security group lists port 22 as ssh.
Where the HECK do I discover a user id?
The keypair part all worked, just will not connect.
Reply
Actually, here's what I get:
Command: keyfile "C:\Users\xxxxxx\Downloads\aws stuff\ronspairkey.ppk"
Command: open "myinstance" 22
Command: Trust new Hostkey: Once
Status: Connected to myinstance
Error: Fatal: unable to initialise SFTP on server: could not connect
Error: Could not connect to server
Arg!
Reply