Connecting to amazon lightsail ubuntu server using different ssh portRemote ACCESS - SSH listening port...

Why was Lupin comfortable with saying Voldemort's name?

SET NOCOUNT Error in handling SQL call after upgrade

Am I a Rude Number?

Why avoid shared user accounts?

What sets the resolution of an analog resistive sensor?

Is a new Boolean field better than a null reference when a value can be meaningfully absent?

Non-Cancer terminal illness that can affect young (age 10-13) girls?

Does every functor from Set to Set preserve products?

What are "industrial chops"?

Increment each digit in a number to form a new number

Move fast ...... Or you will lose

Play Zip, Zap, Zop

When can a QA tester start his job?

Absorbing damage with Planeswalker

What incentives do banks have to gather up loans into pools (backed by Ginnie Mae)and selling them?

Removing disk while game is suspended

Can you tell from a blurry photo if focus was too close or too far?

What is the purpose of easy combat scenarios that don't need resource expenditure?

Can my spouse sponsor me for a UK visa if I am unemployed?

In Linux what happens if 1000 files in a directory are moved to another location while another 300 files were added to the source directory?

How can my powered armor quickly replace its ceramic plates?

If I delete my router's history can my ISP still provide it to my parents?

How to deal with an incendiary email that was recalled

How is it possible for both the likelihood and log-likelihood to be asymptotically normal?



Connecting to amazon lightsail ubuntu server using different ssh port


Remote ACCESS - SSH listening port filtered out by Firewall?Why can't I connect to SSH server from Ubuntu client? (while windows client is okay)SSH refusing connection after changing default portCan't change ssh port (Trusty 14.04)Can't connect to my ssh serverissue connecting with sshUbuntu 16.04: SSH server connects locally, but refuses remote connectionsProblems to connect to ubuntu server in a virtual machineSSH port 22: Connection refusedUnable to connect to Ubuntu Server via ssh due to ufw rules update













1















I have changed ssh port in lightsail server in /etc/ssh/sshd_config file to 2200, I have enabled firewall to accept connections on port 2200. But when I am trying to connect through my local machine using command,



ssh -i key.pem ubuntu@13.xxx.x.109 -p 2200


It is showing me an error "ssh: connect to host 13.xxx.x.109 port 2200: Connection refused". Can you help me out why it's connection is being refused?










share|improve this question

























  • Has the key already been shared to the lightsail server, could you use it to login successfully on the default port? Also, do you need to use the absolute path to the key file?

    – Arronical
    Mar 28 '18 at 9:51











  • yeah i was able to connect to lightsail server through port 22 using private key but when I changed port settings and enabled firewall settings on lightsail server its showing me the error shown above. Currently I am using ubuntu as local machine.

    – Bhanu Sankhyan
    Mar 28 '18 at 12:07








  • 1





    Did you change the port that the ssh server is listening on and restart the ssh server? This is normally done in the /etc/ssh/sshd_config file on the server you're trying to ssh into.

    – Arronical
    Mar 28 '18 at 12:24








  • 1





    yes I did changed the port to 2200 and i also checked with nmap, its showing "host is up" on 2200 port of lightsail ubntu server,that means 2200 port is open on server but it's not listening on port 2200 when i am connecting through ssh using my local machine.

    – Bhanu Sankhyan
    Mar 28 '18 at 12:38
















1















I have changed ssh port in lightsail server in /etc/ssh/sshd_config file to 2200, I have enabled firewall to accept connections on port 2200. But when I am trying to connect through my local machine using command,



ssh -i key.pem ubuntu@13.xxx.x.109 -p 2200


It is showing me an error "ssh: connect to host 13.xxx.x.109 port 2200: Connection refused". Can you help me out why it's connection is being refused?










share|improve this question

























  • Has the key already been shared to the lightsail server, could you use it to login successfully on the default port? Also, do you need to use the absolute path to the key file?

    – Arronical
    Mar 28 '18 at 9:51











  • yeah i was able to connect to lightsail server through port 22 using private key but when I changed port settings and enabled firewall settings on lightsail server its showing me the error shown above. Currently I am using ubuntu as local machine.

    – Bhanu Sankhyan
    Mar 28 '18 at 12:07








  • 1





    Did you change the port that the ssh server is listening on and restart the ssh server? This is normally done in the /etc/ssh/sshd_config file on the server you're trying to ssh into.

    – Arronical
    Mar 28 '18 at 12:24








  • 1





    yes I did changed the port to 2200 and i also checked with nmap, its showing "host is up" on 2200 port of lightsail ubntu server,that means 2200 port is open on server but it's not listening on port 2200 when i am connecting through ssh using my local machine.

    – Bhanu Sankhyan
    Mar 28 '18 at 12:38














1












1








1


1






I have changed ssh port in lightsail server in /etc/ssh/sshd_config file to 2200, I have enabled firewall to accept connections on port 2200. But when I am trying to connect through my local machine using command,



ssh -i key.pem ubuntu@13.xxx.x.109 -p 2200


It is showing me an error "ssh: connect to host 13.xxx.x.109 port 2200: Connection refused". Can you help me out why it's connection is being refused?










share|improve this question
















I have changed ssh port in lightsail server in /etc/ssh/sshd_config file to 2200, I have enabled firewall to accept connections on port 2200. But when I am trying to connect through my local machine using command,



ssh -i key.pem ubuntu@13.xxx.x.109 -p 2200


It is showing me an error "ssh: connect to host 13.xxx.x.109 port 2200: Connection refused". Can you help me out why it's connection is being refused?







ssh






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Mar 28 '18 at 9:47









Arronical

13.5k84892




13.5k84892










asked Mar 28 '18 at 8:51









Bhanu SankhyanBhanu Sankhyan

61




61













  • Has the key already been shared to the lightsail server, could you use it to login successfully on the default port? Also, do you need to use the absolute path to the key file?

    – Arronical
    Mar 28 '18 at 9:51











  • yeah i was able to connect to lightsail server through port 22 using private key but when I changed port settings and enabled firewall settings on lightsail server its showing me the error shown above. Currently I am using ubuntu as local machine.

    – Bhanu Sankhyan
    Mar 28 '18 at 12:07








  • 1





    Did you change the port that the ssh server is listening on and restart the ssh server? This is normally done in the /etc/ssh/sshd_config file on the server you're trying to ssh into.

    – Arronical
    Mar 28 '18 at 12:24








  • 1





    yes I did changed the port to 2200 and i also checked with nmap, its showing "host is up" on 2200 port of lightsail ubntu server,that means 2200 port is open on server but it's not listening on port 2200 when i am connecting through ssh using my local machine.

    – Bhanu Sankhyan
    Mar 28 '18 at 12:38



















  • Has the key already been shared to the lightsail server, could you use it to login successfully on the default port? Also, do you need to use the absolute path to the key file?

    – Arronical
    Mar 28 '18 at 9:51











  • yeah i was able to connect to lightsail server through port 22 using private key but when I changed port settings and enabled firewall settings on lightsail server its showing me the error shown above. Currently I am using ubuntu as local machine.

    – Bhanu Sankhyan
    Mar 28 '18 at 12:07








  • 1





    Did you change the port that the ssh server is listening on and restart the ssh server? This is normally done in the /etc/ssh/sshd_config file on the server you're trying to ssh into.

    – Arronical
    Mar 28 '18 at 12:24








  • 1





    yes I did changed the port to 2200 and i also checked with nmap, its showing "host is up" on 2200 port of lightsail ubntu server,that means 2200 port is open on server but it's not listening on port 2200 when i am connecting through ssh using my local machine.

    – Bhanu Sankhyan
    Mar 28 '18 at 12:38

















Has the key already been shared to the lightsail server, could you use it to login successfully on the default port? Also, do you need to use the absolute path to the key file?

– Arronical
Mar 28 '18 at 9:51





Has the key already been shared to the lightsail server, could you use it to login successfully on the default port? Also, do you need to use the absolute path to the key file?

– Arronical
Mar 28 '18 at 9:51













yeah i was able to connect to lightsail server through port 22 using private key but when I changed port settings and enabled firewall settings on lightsail server its showing me the error shown above. Currently I am using ubuntu as local machine.

– Bhanu Sankhyan
Mar 28 '18 at 12:07







yeah i was able to connect to lightsail server through port 22 using private key but when I changed port settings and enabled firewall settings on lightsail server its showing me the error shown above. Currently I am using ubuntu as local machine.

– Bhanu Sankhyan
Mar 28 '18 at 12:07






1




1





Did you change the port that the ssh server is listening on and restart the ssh server? This is normally done in the /etc/ssh/sshd_config file on the server you're trying to ssh into.

– Arronical
Mar 28 '18 at 12:24







Did you change the port that the ssh server is listening on and restart the ssh server? This is normally done in the /etc/ssh/sshd_config file on the server you're trying to ssh into.

– Arronical
Mar 28 '18 at 12:24






1




1





yes I did changed the port to 2200 and i also checked with nmap, its showing "host is up" on 2200 port of lightsail ubntu server,that means 2200 port is open on server but it's not listening on port 2200 when i am connecting through ssh using my local machine.

– Bhanu Sankhyan
Mar 28 '18 at 12:38





yes I did changed the port to 2200 and i also checked with nmap, its showing "host is up" on 2200 port of lightsail ubntu server,that means 2200 port is open on server but it's not listening on port 2200 when i am connecting through ssh using my local machine.

– Bhanu Sankhyan
Mar 28 '18 at 12:38










2 Answers
2






active

oldest

votes


















1














You need to turn on the port of the lightsail manage console.



Use Custom not SSH
Then change the ssh port to 2200






share|improve this answer































    0














    I am using aws LightSail and I ended up doing the following:




    • add to lightsail management console:
      Application = Custom,
      Protocol = TCP,
      Port = 2200


    • edit the port in sshd_config in /etc/ssh/ folder to 2200.


    • restart sshd by sudo service restart sshd


    • add the rule to firewall sudo ufw allow 2200/tcp


    • enable the firewall sudo ufw enable



    Hope this helps!





    share








    New contributor




    CharInt is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
    Check out our Code of Conduct.




















      Your Answer








      StackExchange.ready(function() {
      var channelOptions = {
      tags: "".split(" "),
      id: "89"
      };
      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',
      autoActivateHeartbeat: false,
      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%2faskubuntu.com%2fquestions%2f1019891%2fconnecting-to-amazon-lightsail-ubuntu-server-using-different-ssh-port%23new-answer', 'question_page');
      }
      );

      Post as a guest















      Required, but never shown

























      2 Answers
      2






      active

      oldest

      votes








      2 Answers
      2






      active

      oldest

      votes









      active

      oldest

      votes






      active

      oldest

      votes









      1














      You need to turn on the port of the lightsail manage console.



      Use Custom not SSH
      Then change the ssh port to 2200






      share|improve this answer




























        1














        You need to turn on the port of the lightsail manage console.



        Use Custom not SSH
        Then change the ssh port to 2200






        share|improve this answer


























          1












          1








          1







          You need to turn on the port of the lightsail manage console.



          Use Custom not SSH
          Then change the ssh port to 2200






          share|improve this answer













          You need to turn on the port of the lightsail manage console.



          Use Custom not SSH
          Then change the ssh port to 2200







          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered Apr 20 '18 at 17:18









          Luis TorruellaLuis Torruella

          112




          112

























              0














              I am using aws LightSail and I ended up doing the following:




              • add to lightsail management console:
                Application = Custom,
                Protocol = TCP,
                Port = 2200


              • edit the port in sshd_config in /etc/ssh/ folder to 2200.


              • restart sshd by sudo service restart sshd


              • add the rule to firewall sudo ufw allow 2200/tcp


              • enable the firewall sudo ufw enable



              Hope this helps!





              share








              New contributor




              CharInt is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
              Check out our Code of Conduct.

























                0














                I am using aws LightSail and I ended up doing the following:




                • add to lightsail management console:
                  Application = Custom,
                  Protocol = TCP,
                  Port = 2200


                • edit the port in sshd_config in /etc/ssh/ folder to 2200.


                • restart sshd by sudo service restart sshd


                • add the rule to firewall sudo ufw allow 2200/tcp


                • enable the firewall sudo ufw enable



                Hope this helps!





                share








                New contributor




                CharInt is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                Check out our Code of Conduct.























                  0












                  0








                  0







                  I am using aws LightSail and I ended up doing the following:




                  • add to lightsail management console:
                    Application = Custom,
                    Protocol = TCP,
                    Port = 2200


                  • edit the port in sshd_config in /etc/ssh/ folder to 2200.


                  • restart sshd by sudo service restart sshd


                  • add the rule to firewall sudo ufw allow 2200/tcp


                  • enable the firewall sudo ufw enable



                  Hope this helps!





                  share








                  New contributor




                  CharInt is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                  Check out our Code of Conduct.










                  I am using aws LightSail and I ended up doing the following:




                  • add to lightsail management console:
                    Application = Custom,
                    Protocol = TCP,
                    Port = 2200


                  • edit the port in sshd_config in /etc/ssh/ folder to 2200.


                  • restart sshd by sudo service restart sshd


                  • add the rule to firewall sudo ufw allow 2200/tcp


                  • enable the firewall sudo ufw enable



                  Hope this helps!






                  share








                  New contributor




                  CharInt is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                  Check out our Code of Conduct.








                  share


                  share






                  New contributor




                  CharInt is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                  Check out our Code of Conduct.









                  answered 2 mins ago









                  CharIntCharInt

                  1




                  1




                  New contributor




                  CharInt is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                  Check out our Code of Conduct.





                  New contributor





                  CharInt is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                  Check out our Code of Conduct.






                  CharInt is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                  Check out our Code of Conduct.






























                      draft saved

                      draft discarded




















































                      Thanks for contributing an answer to Ask Ubuntu!


                      • 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%2faskubuntu.com%2fquestions%2f1019891%2fconnecting-to-amazon-lightsail-ubuntu-server-using-different-ssh-port%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

                      List of shipwrecks in 1808...

                      Is there a lightweight tool to crop images quickly?Cropping Images using Command Line Tools OnlyHow to crop...

                      Unit packagekit.service is masked Announcing the arrival of Valued Associate #679: Cesar...