Is it possible to ssh between two different network?











up vote
8
down vote

favorite
2












How do you SSH between two different networks? Thanks in advance. Here is the scenario in question:




  • My home PC IP : 192.168.1.106

  • Home public IP: XXX.YYY.ZZZ.254

  • My office PC IP: 192.168.10.130

  • Office public IP: XXX.YYY.ZZZ.160


How do I can SSH from 192.168.1.106 (my home) to 192.168.10.130 (office) or vice versa? Is this possible? Please help me.










share|improve this question




























    up vote
    8
    down vote

    favorite
    2












    How do you SSH between two different networks? Thanks in advance. Here is the scenario in question:




    • My home PC IP : 192.168.1.106

    • Home public IP: XXX.YYY.ZZZ.254

    • My office PC IP: 192.168.10.130

    • Office public IP: XXX.YYY.ZZZ.160


    How do I can SSH from 192.168.1.106 (my home) to 192.168.10.130 (office) or vice versa? Is this possible? Please help me.










    share|improve this question


























      up vote
      8
      down vote

      favorite
      2









      up vote
      8
      down vote

      favorite
      2






      2





      How do you SSH between two different networks? Thanks in advance. Here is the scenario in question:




      • My home PC IP : 192.168.1.106

      • Home public IP: XXX.YYY.ZZZ.254

      • My office PC IP: 192.168.10.130

      • Office public IP: XXX.YYY.ZZZ.160


      How do I can SSH from 192.168.1.106 (my home) to 192.168.10.130 (office) or vice versa? Is this possible? Please help me.










      share|improve this question















      How do you SSH between two different networks? Thanks in advance. Here is the scenario in question:




      • My home PC IP : 192.168.1.106

      • Home public IP: XXX.YYY.ZZZ.254

      • My office PC IP: 192.168.10.130

      • Office public IP: XXX.YYY.ZZZ.160


      How do I can SSH from 192.168.1.106 (my home) to 192.168.10.130 (office) or vice versa? Is this possible? Please help me.







      networking server ssh






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Feb 3 at 10:42









      galoget

      2,1262820




      2,1262820










      asked Mar 23 '16 at 7:41









      Dinesh Dhananjayan

      127125




      127125






















          3 Answers
          3






          active

          oldest

          votes

















          up vote
          4
          down vote



          accepted










          This is possible if you have port forwarding on a receiving router. For instance, if you want to ssh from office back to home, you need to go into home router settings first, and set up port forwarding for port 22 to a specific IP address on your home network and port number, in your case 192.168.1.106 port 22. That way if you do from office ssh user@XXX.YYY.ZZZ.254 , you will be redirected from router to your home computer.



          Settings for port forwarding differ form router to router; just to get a feel for it, look at the examples in the How To Forward Ports on Your Router article



          With office, it may be difficult because it depends on your company and typically IT would say no, but you might want to ask them






          share|improve this answer





















          • Its working!!!.Thank you very much for your valuable help.
            – Dinesh Dhananjayan
            Mar 25 '16 at 9:39


















          up vote
          0
          down vote













          Yes, it is absolutely possible. You typically use port forwarding for that (for different residential routers, the way you do port forwarding may vary). There is one problem with it, however. Most Internet service providers will not allow you to do that. So, probably you will not be able to access your home computer from work. Remote login over the Internet is almost always means that you're going to have to contact your ISP to tell them that you want this feature enabled which most likely will cost you additional money. At least, that was the case with me when I wanted to get access to my computer at home from work.



          For additional information on how to properly set up port forwarding, just look on YouTube.






          share|improve this answer




























            up vote
            0
            down vote













            You need a public facing port to connect to.



            A good solution is NGROK , search "TCP tunnel"
            you want ngrok tcp 22.



            It exposes the port to its own temporary domain name that is public facing.
            ngrok is free, though the free users have their domain reset when ngrok closes. Putting the computer to sleep doesn't close down ngrok. Just don't close down ngrok and you should be fine.



            The other option I have done is to buy a host, (domain optional) (I use digitalocean, and namesilo), then use tinc to vpn my home computer, my server, and my laptop with my server as the host and the other two computers as clients. I then ssh to my server, then I can ssh to my other computer.






            share|improve this answer























              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',
              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%2f749230%2fis-it-possible-to-ssh-between-two-different-network%23new-answer', 'question_page');
              }
              );

              Post as a guest















              Required, but never shown

























              3 Answers
              3






              active

              oldest

              votes








              3 Answers
              3






              active

              oldest

              votes









              active

              oldest

              votes






              active

              oldest

              votes








              up vote
              4
              down vote



              accepted










              This is possible if you have port forwarding on a receiving router. For instance, if you want to ssh from office back to home, you need to go into home router settings first, and set up port forwarding for port 22 to a specific IP address on your home network and port number, in your case 192.168.1.106 port 22. That way if you do from office ssh user@XXX.YYY.ZZZ.254 , you will be redirected from router to your home computer.



              Settings for port forwarding differ form router to router; just to get a feel for it, look at the examples in the How To Forward Ports on Your Router article



              With office, it may be difficult because it depends on your company and typically IT would say no, but you might want to ask them






              share|improve this answer





















              • Its working!!!.Thank you very much for your valuable help.
                – Dinesh Dhananjayan
                Mar 25 '16 at 9:39















              up vote
              4
              down vote



              accepted










              This is possible if you have port forwarding on a receiving router. For instance, if you want to ssh from office back to home, you need to go into home router settings first, and set up port forwarding for port 22 to a specific IP address on your home network and port number, in your case 192.168.1.106 port 22. That way if you do from office ssh user@XXX.YYY.ZZZ.254 , you will be redirected from router to your home computer.



              Settings for port forwarding differ form router to router; just to get a feel for it, look at the examples in the How To Forward Ports on Your Router article



              With office, it may be difficult because it depends on your company and typically IT would say no, but you might want to ask them






              share|improve this answer





















              • Its working!!!.Thank you very much for your valuable help.
                – Dinesh Dhananjayan
                Mar 25 '16 at 9:39













              up vote
              4
              down vote



              accepted







              up vote
              4
              down vote



              accepted






              This is possible if you have port forwarding on a receiving router. For instance, if you want to ssh from office back to home, you need to go into home router settings first, and set up port forwarding for port 22 to a specific IP address on your home network and port number, in your case 192.168.1.106 port 22. That way if you do from office ssh user@XXX.YYY.ZZZ.254 , you will be redirected from router to your home computer.



              Settings for port forwarding differ form router to router; just to get a feel for it, look at the examples in the How To Forward Ports on Your Router article



              With office, it may be difficult because it depends on your company and typically IT would say no, but you might want to ask them






              share|improve this answer












              This is possible if you have port forwarding on a receiving router. For instance, if you want to ssh from office back to home, you need to go into home router settings first, and set up port forwarding for port 22 to a specific IP address on your home network and port number, in your case 192.168.1.106 port 22. That way if you do from office ssh user@XXX.YYY.ZZZ.254 , you will be redirected from router to your home computer.



              Settings for port forwarding differ form router to router; just to get a feel for it, look at the examples in the How To Forward Ports on Your Router article



              With office, it may be difficult because it depends on your company and typically IT would say no, but you might want to ask them







              share|improve this answer












              share|improve this answer



              share|improve this answer










              answered Mar 23 '16 at 7:52









              Sergiy Kolodyazhnyy

              67.7k9139301




              67.7k9139301












              • Its working!!!.Thank you very much for your valuable help.
                – Dinesh Dhananjayan
                Mar 25 '16 at 9:39


















              • Its working!!!.Thank you very much for your valuable help.
                – Dinesh Dhananjayan
                Mar 25 '16 at 9:39
















              Its working!!!.Thank you very much for your valuable help.
              – Dinesh Dhananjayan
              Mar 25 '16 at 9:39




              Its working!!!.Thank you very much for your valuable help.
              – Dinesh Dhananjayan
              Mar 25 '16 at 9:39












              up vote
              0
              down vote













              Yes, it is absolutely possible. You typically use port forwarding for that (for different residential routers, the way you do port forwarding may vary). There is one problem with it, however. Most Internet service providers will not allow you to do that. So, probably you will not be able to access your home computer from work. Remote login over the Internet is almost always means that you're going to have to contact your ISP to tell them that you want this feature enabled which most likely will cost you additional money. At least, that was the case with me when I wanted to get access to my computer at home from work.



              For additional information on how to properly set up port forwarding, just look on YouTube.






              share|improve this answer

























                up vote
                0
                down vote













                Yes, it is absolutely possible. You typically use port forwarding for that (for different residential routers, the way you do port forwarding may vary). There is one problem with it, however. Most Internet service providers will not allow you to do that. So, probably you will not be able to access your home computer from work. Remote login over the Internet is almost always means that you're going to have to contact your ISP to tell them that you want this feature enabled which most likely will cost you additional money. At least, that was the case with me when I wanted to get access to my computer at home from work.



                For additional information on how to properly set up port forwarding, just look on YouTube.






                share|improve this answer























                  up vote
                  0
                  down vote










                  up vote
                  0
                  down vote









                  Yes, it is absolutely possible. You typically use port forwarding for that (for different residential routers, the way you do port forwarding may vary). There is one problem with it, however. Most Internet service providers will not allow you to do that. So, probably you will not be able to access your home computer from work. Remote login over the Internet is almost always means that you're going to have to contact your ISP to tell them that you want this feature enabled which most likely will cost you additional money. At least, that was the case with me when I wanted to get access to my computer at home from work.



                  For additional information on how to properly set up port forwarding, just look on YouTube.






                  share|improve this answer












                  Yes, it is absolutely possible. You typically use port forwarding for that (for different residential routers, the way you do port forwarding may vary). There is one problem with it, however. Most Internet service providers will not allow you to do that. So, probably you will not be able to access your home computer from work. Remote login over the Internet is almost always means that you're going to have to contact your ISP to tell them that you want this feature enabled which most likely will cost you additional money. At least, that was the case with me when I wanted to get access to my computer at home from work.



                  For additional information on how to properly set up port forwarding, just look on YouTube.







                  share|improve this answer












                  share|improve this answer



                  share|improve this answer










                  answered Apr 10 '17 at 6:17









                  misha

                  416718




                  416718






















                      up vote
                      0
                      down vote













                      You need a public facing port to connect to.



                      A good solution is NGROK , search "TCP tunnel"
                      you want ngrok tcp 22.



                      It exposes the port to its own temporary domain name that is public facing.
                      ngrok is free, though the free users have their domain reset when ngrok closes. Putting the computer to sleep doesn't close down ngrok. Just don't close down ngrok and you should be fine.



                      The other option I have done is to buy a host, (domain optional) (I use digitalocean, and namesilo), then use tinc to vpn my home computer, my server, and my laptop with my server as the host and the other two computers as clients. I then ssh to my server, then I can ssh to my other computer.






                      share|improve this answer



























                        up vote
                        0
                        down vote













                        You need a public facing port to connect to.



                        A good solution is NGROK , search "TCP tunnel"
                        you want ngrok tcp 22.



                        It exposes the port to its own temporary domain name that is public facing.
                        ngrok is free, though the free users have their domain reset when ngrok closes. Putting the computer to sleep doesn't close down ngrok. Just don't close down ngrok and you should be fine.



                        The other option I have done is to buy a host, (domain optional) (I use digitalocean, and namesilo), then use tinc to vpn my home computer, my server, and my laptop with my server as the host and the other two computers as clients. I then ssh to my server, then I can ssh to my other computer.






                        share|improve this answer

























                          up vote
                          0
                          down vote










                          up vote
                          0
                          down vote









                          You need a public facing port to connect to.



                          A good solution is NGROK , search "TCP tunnel"
                          you want ngrok tcp 22.



                          It exposes the port to its own temporary domain name that is public facing.
                          ngrok is free, though the free users have their domain reset when ngrok closes. Putting the computer to sleep doesn't close down ngrok. Just don't close down ngrok and you should be fine.



                          The other option I have done is to buy a host, (domain optional) (I use digitalocean, and namesilo), then use tinc to vpn my home computer, my server, and my laptop with my server as the host and the other two computers as clients. I then ssh to my server, then I can ssh to my other computer.






                          share|improve this answer














                          You need a public facing port to connect to.



                          A good solution is NGROK , search "TCP tunnel"
                          you want ngrok tcp 22.



                          It exposes the port to its own temporary domain name that is public facing.
                          ngrok is free, though the free users have their domain reset when ngrok closes. Putting the computer to sleep doesn't close down ngrok. Just don't close down ngrok and you should be fine.



                          The other option I have done is to buy a host, (domain optional) (I use digitalocean, and namesilo), then use tinc to vpn my home computer, my server, and my laptop with my server as the host and the other two computers as clients. I then ssh to my server, then I can ssh to my other computer.







                          share|improve this answer














                          share|improve this answer



                          share|improve this answer








                          edited Feb 3 at 10:56









                          galoget

                          2,1262820




                          2,1262820










                          answered Feb 3 at 2:42









                          user1562431

                          1




                          1






























                               

                              draft saved


                              draft discarded



















































                               


                              draft saved


                              draft discarded














                              StackExchange.ready(
                              function () {
                              StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f749230%2fis-it-possible-to-ssh-between-two-different-network%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

                              How to change which sound is reproduced for terminal bell?

                              Title Spacing in Bjornstrup Chapter, Removing Chapter Number From Contents

                              Can I use Tabulator js library in my java Spring + Thymeleaf project?