How do I set up SSH access for an Amazon EC2 instance?

后端 未结 13 1052
挽巷
挽巷 2021-01-29 19:20

I need SSH access to an Amazon EC2 instance running Ubuntu 10.4. All I have is the Amazon username and password. Any ideas?

13条回答
  •  礼貌的吻别
    2021-01-29 19:35

    If you are using MacOS, you should create/edit SSH configuration file (~/.ssh/config) and put something like:

    Host *.amazonaws.com
        User ubuntu
        Port 22
        StrictHostKeyChecking no
        UserKnownHostsFile=/dev/null
        IdentityFile ~/PATH/YOUR_DOWNLOADED_KEY.pem
    

    Then to connect to any of EC2 instances:

    ssh MYNAME.amazonaws.com
    

    Nothing more!

提交回复
热议问题