SSH - Works locally but not remotely












0















So I'm trying to be able to SSH to my desktop again after moving to a new house. I had this working before. The problem is, it works perfectly just using the local IP, but then when I use the WAN IP I get password denied:



***.org's password:

Permission denied, please try again.

***.org's password:

Permission denied, please try again.

***.org's password:

Permission denied (publickey,password).


'* **' being my domain. But I know my password is right, and it only started not working once moved to my new house, and again it works locally. If I turn off port forwarding then of course it doesn't even connect to the host. So I know its at least connecting to my desktop, or at least something changes.



So my question is, since it works locally, and stops working altogether when I turn off port forwarding, what can I do to fix this?










share|improve this question

























  • Can you add the output of ssh -v user@host when connecting to your question? It helps finding the issue.

    – slhck
    May 14 '11 at 22:52











  • ssh -vvv will display even more details

    – vtest
    May 14 '11 at 23:27
















0















So I'm trying to be able to SSH to my desktop again after moving to a new house. I had this working before. The problem is, it works perfectly just using the local IP, but then when I use the WAN IP I get password denied:



***.org's password:

Permission denied, please try again.

***.org's password:

Permission denied, please try again.

***.org's password:

Permission denied (publickey,password).


'* **' being my domain. But I know my password is right, and it only started not working once moved to my new house, and again it works locally. If I turn off port forwarding then of course it doesn't even connect to the host. So I know its at least connecting to my desktop, or at least something changes.



So my question is, since it works locally, and stops working altogether when I turn off port forwarding, what can I do to fix this?










share|improve this question

























  • Can you add the output of ssh -v user@host when connecting to your question? It helps finding the issue.

    – slhck
    May 14 '11 at 22:52











  • ssh -vvv will display even more details

    – vtest
    May 14 '11 at 23:27














0












0








0


1






So I'm trying to be able to SSH to my desktop again after moving to a new house. I had this working before. The problem is, it works perfectly just using the local IP, but then when I use the WAN IP I get password denied:



***.org's password:

Permission denied, please try again.

***.org's password:

Permission denied, please try again.

***.org's password:

Permission denied (publickey,password).


'* **' being my domain. But I know my password is right, and it only started not working once moved to my new house, and again it works locally. If I turn off port forwarding then of course it doesn't even connect to the host. So I know its at least connecting to my desktop, or at least something changes.



So my question is, since it works locally, and stops working altogether when I turn off port forwarding, what can I do to fix this?










share|improve this question
















So I'm trying to be able to SSH to my desktop again after moving to a new house. I had this working before. The problem is, it works perfectly just using the local IP, but then when I use the WAN IP I get password denied:



***.org's password:

Permission denied, please try again.

***.org's password:

Permission denied, please try again.

***.org's password:

Permission denied (publickey,password).


'* **' being my domain. But I know my password is right, and it only started not working once moved to my new house, and again it works locally. If I turn off port forwarding then of course it doesn't even connect to the host. So I know its at least connecting to my desktop, or at least something changes.



So my question is, since it works locally, and stops working altogether when I turn off port forwarding, what can I do to fix this?







ssh






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited May 14 '11 at 23:11









studiohack

11.3k1880114




11.3k1880114










asked May 14 '11 at 22:35









InBetweenInBetween

16419




16419













  • Can you add the output of ssh -v user@host when connecting to your question? It helps finding the issue.

    – slhck
    May 14 '11 at 22:52











  • ssh -vvv will display even more details

    – vtest
    May 14 '11 at 23:27



















  • Can you add the output of ssh -v user@host when connecting to your question? It helps finding the issue.

    – slhck
    May 14 '11 at 22:52











  • ssh -vvv will display even more details

    – vtest
    May 14 '11 at 23:27

















Can you add the output of ssh -v user@host when connecting to your question? It helps finding the issue.

– slhck
May 14 '11 at 22:52





Can you add the output of ssh -v user@host when connecting to your question? It helps finding the issue.

– slhck
May 14 '11 at 22:52













ssh -vvv will display even more details

– vtest
May 14 '11 at 23:27





ssh -vvv will display even more details

– vtest
May 14 '11 at 23:27










2 Answers
2






active

oldest

votes


















0














The first place I'd check is the /etc/hosts.allow file. It can limit what IP's have access to your SSH server.






share|improve this answer

































    0














    A few things to try:
    1) In your /etc/sshd/sshd_config file, make sure that you have 'PasswordAuthentication' set to 'yes'.



    2) Compare the ssh public key in ~/.ssh/known_hosts for the SSH server on both the local machine you are connecting from and the remote machine that you are trying to connect from. The public key should be the same on both, otherwise you're not connecting to the say server.



    3) Make sure your WAN device is set to do port forwarding on port 22 to your SSH server, otherwise you might be connecting directly to your WAN device.






    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',
      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%2fsuperuser.com%2fquestions%2f283563%2fssh-works-locally-but-not-remotely%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









      0














      The first place I'd check is the /etc/hosts.allow file. It can limit what IP's have access to your SSH server.






      share|improve this answer






























        0














        The first place I'd check is the /etc/hosts.allow file. It can limit what IP's have access to your SSH server.






        share|improve this answer




























          0












          0








          0







          The first place I'd check is the /etc/hosts.allow file. It can limit what IP's have access to your SSH server.






          share|improve this answer















          The first place I'd check is the /etc/hosts.allow file. It can limit what IP's have access to your SSH server.







          share|improve this answer














          share|improve this answer



          share|improve this answer








          edited May 14 '11 at 22:59









          studiohack

          11.3k1880114




          11.3k1880114










          answered May 14 '11 at 22:46









          user81295user81295

          412




          412

























              0














              A few things to try:
              1) In your /etc/sshd/sshd_config file, make sure that you have 'PasswordAuthentication' set to 'yes'.



              2) Compare the ssh public key in ~/.ssh/known_hosts for the SSH server on both the local machine you are connecting from and the remote machine that you are trying to connect from. The public key should be the same on both, otherwise you're not connecting to the say server.



              3) Make sure your WAN device is set to do port forwarding on port 22 to your SSH server, otherwise you might be connecting directly to your WAN device.






              share|improve this answer




























                0














                A few things to try:
                1) In your /etc/sshd/sshd_config file, make sure that you have 'PasswordAuthentication' set to 'yes'.



                2) Compare the ssh public key in ~/.ssh/known_hosts for the SSH server on both the local machine you are connecting from and the remote machine that you are trying to connect from. The public key should be the same on both, otherwise you're not connecting to the say server.



                3) Make sure your WAN device is set to do port forwarding on port 22 to your SSH server, otherwise you might be connecting directly to your WAN device.






                share|improve this answer


























                  0












                  0








                  0







                  A few things to try:
                  1) In your /etc/sshd/sshd_config file, make sure that you have 'PasswordAuthentication' set to 'yes'.



                  2) Compare the ssh public key in ~/.ssh/known_hosts for the SSH server on both the local machine you are connecting from and the remote machine that you are trying to connect from. The public key should be the same on both, otherwise you're not connecting to the say server.



                  3) Make sure your WAN device is set to do port forwarding on port 22 to your SSH server, otherwise you might be connecting directly to your WAN device.






                  share|improve this answer













                  A few things to try:
                  1) In your /etc/sshd/sshd_config file, make sure that you have 'PasswordAuthentication' set to 'yes'.



                  2) Compare the ssh public key in ~/.ssh/known_hosts for the SSH server on both the local machine you are connecting from and the remote machine that you are trying to connect from. The public key should be the same on both, otherwise you're not connecting to the say server.



                  3) Make sure your WAN device is set to do port forwarding on port 22 to your SSH server, otherwise you might be connecting directly to your WAN device.







                  share|improve this answer












                  share|improve this answer



                  share|improve this answer










                  answered May 14 '11 at 23:06









                  Andrew CaseAndrew Case

                  1587




                  1587






























                      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.




                      draft saved


                      draft discarded














                      StackExchange.ready(
                      function () {
                      StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f283563%2fssh-works-locally-but-not-remotely%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