AWS EC2 Permission denied (publickey,gssapi-keyex,gssapi-with-mic

Issue:

 ssh -i "key-aws.pem" ec2-user@ec2-IP.compute-1.amazonaws.com

IP: 10.0.0.1

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@         WARNING: UNPROTECTED PRIVATE KEY FILE!          @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
Permissions 0777 for key-aws.pem are too open.
It is required that your private key files are NOT accessible by others.
This private key will be ignored.
bad permissions: ignore key: key-aws.pem
Permission denied (publickey,gssapi-keyex,gssapi-with-mic).

[vagrant@vagrant-centos65]$ chmod 400 key-aws.pem
[vagrant@vagrant-centos65]$ ls -ltr key-aws.pem
-r-xr-xr-x 1 vagrant vagrant 1692  key-aws.pem

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@         WARNING: UNPROTECTED PRIVATE KEY FILE!          @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
Permissions 0555 for 'key-aws.pem' are too open.
It is required that your private key files are NOT accessible by others.
This private key will be ignored.
bad permissions: ignore key: key-aws.pem
Permission denied (publickey,gssapi-keyex,gssapi-with-mic).

Solution:

Follow the below steps and it will resolved for sure;
1. Copy the key-aws.pem into /home/vagrant/.ssh/
    cp key-aws.pem /home/vagrant/.ssh/
2. Change the file permission to read for that user only.
     chmod 400 /home/vagrant/.ssh/key-aws.pem
     [vagrant@vagrant-centos65]$ ls -ltr /home/vagrant/.ssh/
     -r-------- 1 vagrant vagrant 1692 key-aws.pem
3. Execute ssh command now.
    ssh -i "/home/vagrant/.ssh/key-aws.pem" ec2-user@ec2-IP.compute-1.amazonaws.com   

Happy learning and implementation!!

26 comments:

  1. Decent post. I learn something absolutely new and testing on sites I earthcycle consistently. It's consistently valuable to peruse articles from different writers and work on something from different destinations.

    ReplyDelete
  2. Decent post. I learn something absolutely new and testing on sites I earthcycle consistently. It's consistently valuable to peruse articles from different writers and work on something from different destinations.

    ReplyDelete
  3. Thank you for your post, I look for such article along time, today i find it finally. this post give me lots of advise it is very useful for me.
    AWS Training in Chennai

    ReplyDelete
  4. Hello
    Please i just took up LABRADOR PUPPIES breeding as a hobby after my mom passed away because they were her favorite PUPPIES. Despite the fact that they are very intelligent, am finding it very difficult getting them to mate.
    For any information CLICK HERE ENGLISH LABRADOR PUPPIES FOR SALE.THANKS

    ReplyDelete
  5. Hello
    Please i just took up LABRADOR PUPPIES breeding as a hobby after my mom passed away because they were her favorite PUPPIES. Despite the fact that they are very intelligent, am finding it very difficult getting them to mate.
    For any information CLICK HERE LABRADOR PUPPIES FOR SALE.THANKS

    ReplyDelete
  6. Hello
    Please i just took up LABRADOR PUPPIES breeding as a hobby after my mom passed away because they were her favorite PUPPIES. Despite the fact that they are very intelligent, am finding it very difficult getting them to mate.
    For any information CLICK HERE http://championlabradorhomes.company.com/. THANKS

    ReplyDelete
  7. Ucuz, kaliteli ve organik sosyal medya hizmetleri satın almak için Ravje Medyayı tercih edebilir ve sosyal medya hesaplarını hızla büyütebilirsin. Ravje Medya ile sosyal medya hesaplarını organik ve gerçek kişiler ile geliştirebilir, kişisel ya da ticari hesapların için Ravje Medyayı tercih edebilirsin. Ravje Medya internet sitesine giriş yapmak için hemen tıkla: www.ravje.com

    İnstagram takipçi satın almak için Ravje Medya hizmetlerini tercih edebilir, güvenilir ve gerçek takipçilere Ravje Medya ile ulaşabilirsin. İnstagram takipçi satın almak artık Ravje Medya ile oldukça güvenilir. Hemen instagram takipçi satın almak için Ravje Medyanın ilgili sayfasını ziyaret et: instagram takipçi satın al

    Tiktok takipçi satın al istiyorsan tercihini Ravje Medya yap! Ravje Medya uzman kadrosu ve profesyonel ekibi ile sizlere Tiktok takipçi satın alma hizmetide sunmaktadır. Tiktok takipçi satın almak için hemen tıkla: tiktok takipçi satın al

    İnstagram beğeni satın almak için Ravje medya instagram beğeni satın al sayfasına giriş yap, hızlı ve kaliteli instagram beğeni satın al: instagram beğeni satın al

    Youtube izlenme satın al sayfası ile hemen youtube izlenme satın al! Ravje medya kalitesi ile hemen youtube izlenme satın almak için tıklayın: youtube izlenme satın al

    Twitter takipçi satın almak istiyorsan Ravje medya twitter takipçi satın al sayfasına tıkla, Ravje medya güvencesi ile organik twitter takipçi satın al: twitter takipçi satın al

    ReplyDelete
  8. Totally loved your article. Looking forward to see more more from you. Meanwhile feel free to surf through my website while i give your blog a read.
    welcome to Newsome frenchies
    where to buy french bulldog puppies
    frenchies bulldog puppies
    in Australia

    Nice & Informative Blog ! We offer welcome to Mila bulldogs. Check it out!...
    puppies for sale near me
    British bulldog puppies for sale
    where to buy

    ReplyDelete
  9. Please i just took up chihuahua puppies breeding as a hobby after my mom passed away because they were her favorite PUPPIES. Despite the fact that they are very intelligent, am finding it very difficult getting them to mate
    hairless cats for sale, hairless cat for sale, sphynx cat for sale near me, teacup chihuahua puppies for sale

    ReplyDelete

  10. How are Sphynx cats with other pets?
    This is hard to answer. Generally, as a breed and given how affectionate they are I would say you have a better chance of a Sphynx cat getting along with other pets than a different breed of cat. But then each one is different and may or may not like any given pet or person. https://www.royaltykitten.com/
    sphynx cats for sale
    They definitely do not like to be alone, that was one of the reasons we got two. So it is always good for them to have a buddy if you are going to be away at work all day. https://www.chihuahuapuppiesforsale1.com/
    Sphynx kittens for sale, sphynx kittens for sale $500

    ReplyDelete

  11. I absolutely agree with the above. In addition, I would encourage using a service like sphynx kittens for sale, chihuahua puppy for sale breeding as a hobby after my mom passed away because they were her favorite pets. chihuahua puppies for sale, sphynx cat for sale near me

    ReplyDelete

  12. https://www.chihuahuapuppiesforsale1.com/
    http://www.myppuphouse.com/
    https://www.yorkiespuppiessale.com/
    https://chowchowpuppiessale.com/
    http://www.globalkittens.com/

    ReplyDelete
  13. How long does a Yorkie live? 13 – 16 years
    Are Yorkies cuddlers?
    A lover of all things comfortable, the Yorkshire terrier enjoys cuddling with loved ones and snuggling into everything soft and fluffy. And for you, their silky coat isn't too bad for petting. https://www.newdaypuppies.com/

    Adorable Teacup and Toy AKC Yorkie Puppies
    We have adorable Yorkshire Terrier puppies male and female (she is pictured with the bow).The little girl was born on and the male was born on. yorkie teacup for sale Both puppies have started potty training and have had all sets of puppy shots and deworming. They both come with AKC papers.The girl is very petite and has an adorable baby doll face. yorkies for sale near me She is a teacup and will mature to be around just lbs. She is very gentle and easy going She is the princess in our home and loves to be held.The male is full of spunk and is super playful He will mature to be lbs and would make an awesome family dog. He has a gorgeous silky coat and adorable teddy bear face.Both puppies are AKC registered and will come with a health guarantee shot record and sample puppy food. teacup yorkies for sale, teacup yorkie puppies for sale

    Adorable Teacup and Toy AKC Yorkie Puppies is a Female, Male Yorkshire Terrier Puppy for sale in US. Adorable Teacup and Toy AKC Yorkie Puppies by newdaypuppies for Female, Male Yorkshire Terrier Puppies. yorkshire terrier for sale

    ReplyDelete
  14. Is a Yorkie a good family dog?
    yorkie puppies for sale
    Yorkies, like many other Toy breeds, make good pets for people; they're especially good for senior citizens, people with medical issues, and those who may worry about the size and strength of a larger dog. ... They're loving, devoted, and very affectionate: This makes them great personal companions and good family pets.

    Do Yorkshire terriers bark a lot?
    teacup yorkie for sale
    Yorkshire Terriers are little dogs with huge personalities. yorkies for sale With those huge personalities come a fierce territorial bark. Any time your phone rings, someone speaks or knocks on your door, or your doorbell chimes, your Yorkshire Terrier will likely bark. Outside noises aren't even required for barking for some Yorkies. yorkie for sale near me

    How much do Yorkshire terriers cost?
    yorkies puppy for sale
    Typical Yorkie prices range from $1,500 to $3,000, but the cost can fall far below or above that range. Prices will vary based on the puppy's lineage, appearance, health, and the breeder. It's also possible to adopt an older Yorkie for significantly less through a rescue shelter.

    ReplyDelete
  15. Are Chihuahua puppies hard to train?
    chihuahua puppies for sale
    Chihuahuas are intelligent, strong-minded dogs that like to do their own thing. This can make them stubborn, earning them a reputation for being hard to train. However, reward-based training methods do appeal to a Chihuahua and there's no reason why they can't be trained to be obedient, just as with any dog

    Chihuahuas Have Fun, Playful Personalities
    teacup chihuahuas for sale
    Though chihuahuas are loyal and affectionate with their owners, they are anything but dull and love to play! However, no two chihuahuas are the same, so if you have a friend with a chihuahua, your pet is likely to be quite different and unique

    What food is bad for Chihuahua?
    teacup chihuahua for sale
    Foods Your Chihuahua Shouldn't Eat
    Alcohol. Alcohol (ethanol) is highly toxic to dogs. ...
    Caffeine. Coffee is one of the world's most popular beverages, with roughly 83% of the United States adult population consuming it on a daily basis. ...
    Chocolate. ...
    Some Fruit Seeds, Pits and Cores. ...
    Garlic. ...
    Grapes and Raisins. ...
    Hops. ...
    Onions.
    chihuahua puppy for sale

    The easiest way to adopt a Chihuahua would be through a rescue that specializes in Chihuahuas. A great place to start would be by starting a breed search on https://www.chihuahuapuppiesforsale1.com/chihuahua-puppies-for-sale-near-me/. The search will show you all the available Chihuahuas in your area.
    chihuahua puppies for sale near me

    ReplyDelete
  16. Are Yorkies good for first time dog owners?
    teacup yorkie for sale
    The Yorkshire terrier is a great starter dog for those who want a little lap dog. This breed is affectionate towards its owner and may even act protective around strangers.
    The Yorkie has a moderate energy level and only needs basic exercise.

    yorkie puppies for sale good for first time owners?
    yorkie puppies for sale
    It is the ideal pet for people who don't want to deal with pet fur at home or in their cars. This is the ideal pet for first time dog owners, since it trains easily and needs only moderate grooming maintenance. Yorkie poos are good with kids. It will play with them, is energetic and affectionate.

    Are Yorkie hypoallergenic? Yes
    Are Yorkie Poo good for first time owners?
    yorkie for sale
    It is the ideal pet for people who don't want to deal with pet fur at home or in their cars. This is the ideal pet for first time dog owners, since it trains easily and needs only moderate grooming maintenance. Yorkie poos are good with kids. It will play with them, is energetic and affectionate.
    teacup chihuahuas for sale

    Are Yorkie Poos good dogs?
    yorkies for sale

    ReplyDelete
  17. This comment has been removed by the author.

    ReplyDelete
  18. This is my first time i visit here and I found so many interesting stuff in your blog especially it's discussion,Meanwhile feel free to surf through my website while i give your blog a read. thank you.
    click here
    lab puppies for sale near me
    labrador retriever puppies for sale
    labrador puppies for sale
    labrador retriever for sale
    labrador retriever puppies for sale near me
    labrador breeders near me
    labrador retriever breeders near me

    ReplyDelete
  19. This is my first time i visit here and I found so many interesting stuff in your blog especially it's discussion,Meanwhile feel free to surf through my website while i give your blog a read. thank you.
    click here
    lab puppies for sale near me
    labrador retriever puppies for sale
    labrador puppies for sale
    labrador retriever for sale
    labrador retriever puppies for sale near me
    labrador breeders near me
    labrador retriever breeders near me

    ReplyDelete

Please provide your input, it will honer for me...