SSH into EC2 instance: Operation timed out











up vote
0
down vote

favorite












I'm trying to ssh into my ec2 instance in order to deploy my MEAN-stack app but no matter what I'm receiving a timeout error. I've tried so many solutions that were posted in other StackExchange threads but to no avail. I am running macOS 10.14.1



On my mac I've tried connecting via FileZilla, Cyberduck and even using command line arguments such as ssh -v -v -v -i "<pem-file-name>.pem" ubuntu@ec2-18-207-106-113.compute-1.amazonaws.com and ssh ubuntu@ec2-18-207-106-113.compute-1.amazonaws.com. Below is the error output from running either of these commands:



OpenSSH_7.1p2, OpenSSL 1.0.2g  1 Mar 2016
debug1: Reading configuration data /etc/ssh/ssh_config
debug2: ssh_connect: needpriv 0
debug1: Connecting to ec2-18-207-106-113.compute-1.amazonaws.com [18.207.106.113] port 22.
debug1: connect to address 18.207.106.113 port 22: Connection timed out
ssh: connect to host ec2-18-207-106-113.compute-1.amazonaws.com port 22: Connection timed out


These are the solutions that I've tried that did not seem to work:




  • Connecting on Windows 10 using PuTTY, FileZilla and command line, but also received the same timeout errors.


  • Using a different MSI (first with Bitnami, then with Ubuntu)


  • Firewall is disabled


  • Resetting the default port in /etc/ssh/ssh_config and connecting to the new port


  • Pinging ec2-18-207-106-113.compute-1.amazonaws.com and 18.207.106.113 is successful



  • Running command netstat -nat | grep 22 gives the below output



    tcp4       0      0  192.168.254.17.56207   17.249.188.80.5223     ESTABLISHED
    9e4be63389882253 stream 0 0 0 9e4be6338988231b 0 0
    9e4be6338988231b stream 0 0 0 9e4be63389882253 0 0
    9e4be63384ea2193 dgram 0 0 0 9e4be63384ea225b 9e4be63384ea225b 0
    9e4be63384ea225b dgram 0 0 0 9e4be63384ea2193 9e4be63384ea2193 0
    kctl 0 0 22 9 com.apple.netsrc


  • The EC2 security group has the following inbound rules set up: EC2 Security Group











share|improve this question


























    up vote
    0
    down vote

    favorite












    I'm trying to ssh into my ec2 instance in order to deploy my MEAN-stack app but no matter what I'm receiving a timeout error. I've tried so many solutions that were posted in other StackExchange threads but to no avail. I am running macOS 10.14.1



    On my mac I've tried connecting via FileZilla, Cyberduck and even using command line arguments such as ssh -v -v -v -i "<pem-file-name>.pem" ubuntu@ec2-18-207-106-113.compute-1.amazonaws.com and ssh ubuntu@ec2-18-207-106-113.compute-1.amazonaws.com. Below is the error output from running either of these commands:



    OpenSSH_7.1p2, OpenSSL 1.0.2g  1 Mar 2016
    debug1: Reading configuration data /etc/ssh/ssh_config
    debug2: ssh_connect: needpriv 0
    debug1: Connecting to ec2-18-207-106-113.compute-1.amazonaws.com [18.207.106.113] port 22.
    debug1: connect to address 18.207.106.113 port 22: Connection timed out
    ssh: connect to host ec2-18-207-106-113.compute-1.amazonaws.com port 22: Connection timed out


    These are the solutions that I've tried that did not seem to work:




    • Connecting on Windows 10 using PuTTY, FileZilla and command line, but also received the same timeout errors.


    • Using a different MSI (first with Bitnami, then with Ubuntu)


    • Firewall is disabled


    • Resetting the default port in /etc/ssh/ssh_config and connecting to the new port


    • Pinging ec2-18-207-106-113.compute-1.amazonaws.com and 18.207.106.113 is successful



    • Running command netstat -nat | grep 22 gives the below output



      tcp4       0      0  192.168.254.17.56207   17.249.188.80.5223     ESTABLISHED
      9e4be63389882253 stream 0 0 0 9e4be6338988231b 0 0
      9e4be6338988231b stream 0 0 0 9e4be63389882253 0 0
      9e4be63384ea2193 dgram 0 0 0 9e4be63384ea225b 9e4be63384ea225b 0
      9e4be63384ea225b dgram 0 0 0 9e4be63384ea2193 9e4be63384ea2193 0
      kctl 0 0 22 9 com.apple.netsrc


    • The EC2 security group has the following inbound rules set up: EC2 Security Group











    share|improve this question
























      up vote
      0
      down vote

      favorite









      up vote
      0
      down vote

      favorite











      I'm trying to ssh into my ec2 instance in order to deploy my MEAN-stack app but no matter what I'm receiving a timeout error. I've tried so many solutions that were posted in other StackExchange threads but to no avail. I am running macOS 10.14.1



      On my mac I've tried connecting via FileZilla, Cyberduck and even using command line arguments such as ssh -v -v -v -i "<pem-file-name>.pem" ubuntu@ec2-18-207-106-113.compute-1.amazonaws.com and ssh ubuntu@ec2-18-207-106-113.compute-1.amazonaws.com. Below is the error output from running either of these commands:



      OpenSSH_7.1p2, OpenSSL 1.0.2g  1 Mar 2016
      debug1: Reading configuration data /etc/ssh/ssh_config
      debug2: ssh_connect: needpriv 0
      debug1: Connecting to ec2-18-207-106-113.compute-1.amazonaws.com [18.207.106.113] port 22.
      debug1: connect to address 18.207.106.113 port 22: Connection timed out
      ssh: connect to host ec2-18-207-106-113.compute-1.amazonaws.com port 22: Connection timed out


      These are the solutions that I've tried that did not seem to work:




      • Connecting on Windows 10 using PuTTY, FileZilla and command line, but also received the same timeout errors.


      • Using a different MSI (first with Bitnami, then with Ubuntu)


      • Firewall is disabled


      • Resetting the default port in /etc/ssh/ssh_config and connecting to the new port


      • Pinging ec2-18-207-106-113.compute-1.amazonaws.com and 18.207.106.113 is successful



      • Running command netstat -nat | grep 22 gives the below output



        tcp4       0      0  192.168.254.17.56207   17.249.188.80.5223     ESTABLISHED
        9e4be63389882253 stream 0 0 0 9e4be6338988231b 0 0
        9e4be6338988231b stream 0 0 0 9e4be63389882253 0 0
        9e4be63384ea2193 dgram 0 0 0 9e4be63384ea225b 9e4be63384ea225b 0
        9e4be63384ea225b dgram 0 0 0 9e4be63384ea2193 9e4be63384ea2193 0
        kctl 0 0 22 9 com.apple.netsrc


      • The EC2 security group has the following inbound rules set up: EC2 Security Group











      share|improve this question













      I'm trying to ssh into my ec2 instance in order to deploy my MEAN-stack app but no matter what I'm receiving a timeout error. I've tried so many solutions that were posted in other StackExchange threads but to no avail. I am running macOS 10.14.1



      On my mac I've tried connecting via FileZilla, Cyberduck and even using command line arguments such as ssh -v -v -v -i "<pem-file-name>.pem" ubuntu@ec2-18-207-106-113.compute-1.amazonaws.com and ssh ubuntu@ec2-18-207-106-113.compute-1.amazonaws.com. Below is the error output from running either of these commands:



      OpenSSH_7.1p2, OpenSSL 1.0.2g  1 Mar 2016
      debug1: Reading configuration data /etc/ssh/ssh_config
      debug2: ssh_connect: needpriv 0
      debug1: Connecting to ec2-18-207-106-113.compute-1.amazonaws.com [18.207.106.113] port 22.
      debug1: connect to address 18.207.106.113 port 22: Connection timed out
      ssh: connect to host ec2-18-207-106-113.compute-1.amazonaws.com port 22: Connection timed out


      These are the solutions that I've tried that did not seem to work:




      • Connecting on Windows 10 using PuTTY, FileZilla and command line, but also received the same timeout errors.


      • Using a different MSI (first with Bitnami, then with Ubuntu)


      • Firewall is disabled


      • Resetting the default port in /etc/ssh/ssh_config and connecting to the new port


      • Pinging ec2-18-207-106-113.compute-1.amazonaws.com and 18.207.106.113 is successful



      • Running command netstat -nat | grep 22 gives the below output



        tcp4       0      0  192.168.254.17.56207   17.249.188.80.5223     ESTABLISHED
        9e4be63389882253 stream 0 0 0 9e4be6338988231b 0 0
        9e4be6338988231b stream 0 0 0 9e4be63389882253 0 0
        9e4be63384ea2193 dgram 0 0 0 9e4be63384ea225b 9e4be63384ea225b 0
        9e4be63384ea225b dgram 0 0 0 9e4be63384ea2193 9e4be63384ea2193 0
        kctl 0 0 22 9 com.apple.netsrc


      • The EC2 security group has the following inbound rules set up: EC2 Security Group








      ubuntu ssh putty amazon-ec2 cyberduck






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Nov 26 at 15:51









      Robert

      31




      31






















          1 Answer
          1






          active

          oldest

          votes

















          up vote
          0
          down vote



          accepted










          Welcome to SuperUser @Robert!



          All of your clues initially seemed to point to an issue with the Security Group attached to the instance, but your SG rules look fine.



          There's a tool called hping that you can get on your Mac (via brew) that you can use to 'ping' port 22 on your 18.207.106.113 server. I tried it and it works:



          $ sudo hping -S -p 22 18.207.106.113
          HPING 18.207.106.113 (en0 18.207.106.113): S set, 40 headers + 0 data bytes
          len=44 ip=18.207.106.113 ttl=42 DF id=0 sport=22 flags=SA seq=0 win=26883 rtt=38.8 ms
          len=44 ip=18.207.106.113 ttl=44 DF id=0 sport=22 flags=SA seq=1 win=26883 rtt=39.6 ms
          len=44 ip=18.207.106.113 ttl=42 DF id=0 sport=22 flags=SA seq=2 win=26883 rtt=40.7 ms


          Now the clues are pointing to an issue on the local side, either your Mac and/or your network.
          For starters, reset your Mac's /etc/ssh/ssh_config to its default, because you didn't change the SSH port the server is listening on.



          If that doesn't work, try putting your Mac onto a different network, perhaps turn on your phone's hotspot and connect to that or go to a friend's house or to a coffee shop.



          And if that fails, use a different machine altogether. That should (hopefully) work, then you can work your way back to tracking down what was causing the problem in your equipment.



          Good luck!






          share|improve this answer





















            Your Answer








            StackExchange.ready(function() {
            var channelOptions = {
            tags: "".split(" "),
            id: "3"
            };
            initTagRenderer("".split(" "), "".split(" "), channelOptions);

            StackExchange.using("externalEditor", function() {
            // Have to fire editor after snippets, if snippets enabled
            if (StackExchange.settings.snippets.snippetsEnabled) {
            StackExchange.using("snippets", function() {
            createEditor();
            });
            }
            else {
            createEditor();
            }
            });

            function createEditor() {
            StackExchange.prepareEditor({
            heartbeatType: 'answer',
            convertImagesToLinks: true,
            noModals: true,
            showLowRepImageUploadWarning: true,
            reputationToPostImages: 10,
            bindNavPrevention: true,
            postfix: "",
            imageUploader: {
            brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
            contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
            allowUrls: true
            },
            onDemand: true,
            discardSelector: ".discard-answer"
            ,immediatelyShowMarkdownHelp:true
            });


            }
            });














            draft saved

            draft discarded


















            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f1378497%2fssh-into-ec2-instance-operation-timed-out%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown

























            1 Answer
            1






            active

            oldest

            votes








            1 Answer
            1






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes








            up vote
            0
            down vote



            accepted










            Welcome to SuperUser @Robert!



            All of your clues initially seemed to point to an issue with the Security Group attached to the instance, but your SG rules look fine.



            There's a tool called hping that you can get on your Mac (via brew) that you can use to 'ping' port 22 on your 18.207.106.113 server. I tried it and it works:



            $ sudo hping -S -p 22 18.207.106.113
            HPING 18.207.106.113 (en0 18.207.106.113): S set, 40 headers + 0 data bytes
            len=44 ip=18.207.106.113 ttl=42 DF id=0 sport=22 flags=SA seq=0 win=26883 rtt=38.8 ms
            len=44 ip=18.207.106.113 ttl=44 DF id=0 sport=22 flags=SA seq=1 win=26883 rtt=39.6 ms
            len=44 ip=18.207.106.113 ttl=42 DF id=0 sport=22 flags=SA seq=2 win=26883 rtt=40.7 ms


            Now the clues are pointing to an issue on the local side, either your Mac and/or your network.
            For starters, reset your Mac's /etc/ssh/ssh_config to its default, because you didn't change the SSH port the server is listening on.



            If that doesn't work, try putting your Mac onto a different network, perhaps turn on your phone's hotspot and connect to that or go to a friend's house or to a coffee shop.



            And if that fails, use a different machine altogether. That should (hopefully) work, then you can work your way back to tracking down what was causing the problem in your equipment.



            Good luck!






            share|improve this answer

























              up vote
              0
              down vote



              accepted










              Welcome to SuperUser @Robert!



              All of your clues initially seemed to point to an issue with the Security Group attached to the instance, but your SG rules look fine.



              There's a tool called hping that you can get on your Mac (via brew) that you can use to 'ping' port 22 on your 18.207.106.113 server. I tried it and it works:



              $ sudo hping -S -p 22 18.207.106.113
              HPING 18.207.106.113 (en0 18.207.106.113): S set, 40 headers + 0 data bytes
              len=44 ip=18.207.106.113 ttl=42 DF id=0 sport=22 flags=SA seq=0 win=26883 rtt=38.8 ms
              len=44 ip=18.207.106.113 ttl=44 DF id=0 sport=22 flags=SA seq=1 win=26883 rtt=39.6 ms
              len=44 ip=18.207.106.113 ttl=42 DF id=0 sport=22 flags=SA seq=2 win=26883 rtt=40.7 ms


              Now the clues are pointing to an issue on the local side, either your Mac and/or your network.
              For starters, reset your Mac's /etc/ssh/ssh_config to its default, because you didn't change the SSH port the server is listening on.



              If that doesn't work, try putting your Mac onto a different network, perhaps turn on your phone's hotspot and connect to that or go to a friend's house or to a coffee shop.



              And if that fails, use a different machine altogether. That should (hopefully) work, then you can work your way back to tracking down what was causing the problem in your equipment.



              Good luck!






              share|improve this answer























                up vote
                0
                down vote



                accepted







                up vote
                0
                down vote



                accepted






                Welcome to SuperUser @Robert!



                All of your clues initially seemed to point to an issue with the Security Group attached to the instance, but your SG rules look fine.



                There's a tool called hping that you can get on your Mac (via brew) that you can use to 'ping' port 22 on your 18.207.106.113 server. I tried it and it works:



                $ sudo hping -S -p 22 18.207.106.113
                HPING 18.207.106.113 (en0 18.207.106.113): S set, 40 headers + 0 data bytes
                len=44 ip=18.207.106.113 ttl=42 DF id=0 sport=22 flags=SA seq=0 win=26883 rtt=38.8 ms
                len=44 ip=18.207.106.113 ttl=44 DF id=0 sport=22 flags=SA seq=1 win=26883 rtt=39.6 ms
                len=44 ip=18.207.106.113 ttl=42 DF id=0 sport=22 flags=SA seq=2 win=26883 rtt=40.7 ms


                Now the clues are pointing to an issue on the local side, either your Mac and/or your network.
                For starters, reset your Mac's /etc/ssh/ssh_config to its default, because you didn't change the SSH port the server is listening on.



                If that doesn't work, try putting your Mac onto a different network, perhaps turn on your phone's hotspot and connect to that or go to a friend's house or to a coffee shop.



                And if that fails, use a different machine altogether. That should (hopefully) work, then you can work your way back to tracking down what was causing the problem in your equipment.



                Good luck!






                share|improve this answer












                Welcome to SuperUser @Robert!



                All of your clues initially seemed to point to an issue with the Security Group attached to the instance, but your SG rules look fine.



                There's a tool called hping that you can get on your Mac (via brew) that you can use to 'ping' port 22 on your 18.207.106.113 server. I tried it and it works:



                $ sudo hping -S -p 22 18.207.106.113
                HPING 18.207.106.113 (en0 18.207.106.113): S set, 40 headers + 0 data bytes
                len=44 ip=18.207.106.113 ttl=42 DF id=0 sport=22 flags=SA seq=0 win=26883 rtt=38.8 ms
                len=44 ip=18.207.106.113 ttl=44 DF id=0 sport=22 flags=SA seq=1 win=26883 rtt=39.6 ms
                len=44 ip=18.207.106.113 ttl=42 DF id=0 sport=22 flags=SA seq=2 win=26883 rtt=40.7 ms


                Now the clues are pointing to an issue on the local side, either your Mac and/or your network.
                For starters, reset your Mac's /etc/ssh/ssh_config to its default, because you didn't change the SSH port the server is listening on.



                If that doesn't work, try putting your Mac onto a different network, perhaps turn on your phone's hotspot and connect to that or go to a friend's house or to a coffee shop.



                And if that fails, use a different machine altogether. That should (hopefully) work, then you can work your way back to tracking down what was causing the problem in your equipment.



                Good luck!







                share|improve this answer












                share|improve this answer



                share|improve this answer










                answered Nov 26 at 18:20









                KJH

                1757




                1757






























                    draft saved

                    draft discarded




















































                    Thanks for contributing an answer to Super User!


                    • Please be sure to answer the question. Provide details and share your research!

                    But avoid



                    • Asking for help, clarification, or responding to other answers.

                    • Making statements based on opinion; back them up with references or personal experience.


                    To learn more, see our tips on writing great answers.





                    Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


                    Please pay close attention to the following guidance:


                    • Please be sure to answer the question. Provide details and share your research!

                    But avoid



                    • Asking for help, clarification, or responding to other answers.

                    • Making statements based on opinion; back them up with references or personal experience.


                    To learn more, see our tips on writing great answers.




                    draft saved


                    draft discarded














                    StackExchange.ready(
                    function () {
                    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f1378497%2fssh-into-ec2-instance-operation-timed-out%23new-answer', 'question_page');
                    }
                    );

                    Post as a guest















                    Required, but never shown





















































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown

































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown







                    Popular posts from this blog

                    Plaza Victoria

                    Brian Clough

                    Cáceres