As I mentioned in a previous blog, you can only use SFTP (can not use FTP) to connect to an EC2 instance. The other thing you need to have correct is an entry in the SSH config file for your private key (of the key pair value for the EC2 instance). In the Unix/Mac world, this file is called config and it is located in the ~/.ssh directory. The following entry needs to be added to this config file:
identityFile ~/tomlaszKeys/PemFileName.pem
Adding this entry will also allow you to connect via SSH without having to pass in the private key file location:
ssh ec2-user@ec2-23-23-237-99.compute-1.amazonaws.com
Instead of:
ssh ec2-user@ec2-23-23-237-99.compute-1.amazonaws.com
-i ~/PemfileName.pem
No comments:
Post a Comment