Internet connection via ssh











up vote
0
down vote

favorite












I'm trying to use ssh to connect my home PC to the Internet via my work PC which has an Internet connection, but I don't seem to get it right.



I'm using Putty to try and establish a connection between the two computers but unsuccessfully, is there a way I can get around this?










share|improve this question
























  • 1. You know you need to connect to your work PC via the internet, right? 2. Are you sure that the SSH server is accessible from outside your work LAN? It's very insecure, though.
    – GiantTree
    Mar 8 '16 at 17:48










  • Yes, my work pc is connected to the Internet and I'm not sure whether the ssh server is accessible outside, I'm using the putty distribution and also tried bitvise ssh client.
    – user15171
    Mar 8 '16 at 17:55










  • @user15171 you missunderstood GiantTree what he tries to point out to you is that to actually beeing able to setup an ssh connection your HomePC needs to have a working Internet Connection.
    – konqui
    Jul 5 '17 at 10:56










  • From user Valentyn: Here is a very good answer to your question if you have ssh access to the work machine.
    – fixer1234
    Nov 17 at 0:52















up vote
0
down vote

favorite












I'm trying to use ssh to connect my home PC to the Internet via my work PC which has an Internet connection, but I don't seem to get it right.



I'm using Putty to try and establish a connection between the two computers but unsuccessfully, is there a way I can get around this?










share|improve this question
























  • 1. You know you need to connect to your work PC via the internet, right? 2. Are you sure that the SSH server is accessible from outside your work LAN? It's very insecure, though.
    – GiantTree
    Mar 8 '16 at 17:48










  • Yes, my work pc is connected to the Internet and I'm not sure whether the ssh server is accessible outside, I'm using the putty distribution and also tried bitvise ssh client.
    – user15171
    Mar 8 '16 at 17:55










  • @user15171 you missunderstood GiantTree what he tries to point out to you is that to actually beeing able to setup an ssh connection your HomePC needs to have a working Internet Connection.
    – konqui
    Jul 5 '17 at 10:56










  • From user Valentyn: Here is a very good answer to your question if you have ssh access to the work machine.
    – fixer1234
    Nov 17 at 0:52













up vote
0
down vote

favorite









up vote
0
down vote

favorite











I'm trying to use ssh to connect my home PC to the Internet via my work PC which has an Internet connection, but I don't seem to get it right.



I'm using Putty to try and establish a connection between the two computers but unsuccessfully, is there a way I can get around this?










share|improve this question















I'm trying to use ssh to connect my home PC to the Internet via my work PC which has an Internet connection, but I don't seem to get it right.



I'm using Putty to try and establish a connection between the two computers but unsuccessfully, is there a way I can get around this?







ssh






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Mar 8 '16 at 18:54









DavidPostill

102k25216252




102k25216252










asked Mar 8 '16 at 17:38









user15171

31




31












  • 1. You know you need to connect to your work PC via the internet, right? 2. Are you sure that the SSH server is accessible from outside your work LAN? It's very insecure, though.
    – GiantTree
    Mar 8 '16 at 17:48










  • Yes, my work pc is connected to the Internet and I'm not sure whether the ssh server is accessible outside, I'm using the putty distribution and also tried bitvise ssh client.
    – user15171
    Mar 8 '16 at 17:55










  • @user15171 you missunderstood GiantTree what he tries to point out to you is that to actually beeing able to setup an ssh connection your HomePC needs to have a working Internet Connection.
    – konqui
    Jul 5 '17 at 10:56










  • From user Valentyn: Here is a very good answer to your question if you have ssh access to the work machine.
    – fixer1234
    Nov 17 at 0:52


















  • 1. You know you need to connect to your work PC via the internet, right? 2. Are you sure that the SSH server is accessible from outside your work LAN? It's very insecure, though.
    – GiantTree
    Mar 8 '16 at 17:48










  • Yes, my work pc is connected to the Internet and I'm not sure whether the ssh server is accessible outside, I'm using the putty distribution and also tried bitvise ssh client.
    – user15171
    Mar 8 '16 at 17:55










  • @user15171 you missunderstood GiantTree what he tries to point out to you is that to actually beeing able to setup an ssh connection your HomePC needs to have a working Internet Connection.
    – konqui
    Jul 5 '17 at 10:56










  • From user Valentyn: Here is a very good answer to your question if you have ssh access to the work machine.
    – fixer1234
    Nov 17 at 0:52
















1. You know you need to connect to your work PC via the internet, right? 2. Are you sure that the SSH server is accessible from outside your work LAN? It's very insecure, though.
– GiantTree
Mar 8 '16 at 17:48




1. You know you need to connect to your work PC via the internet, right? 2. Are you sure that the SSH server is accessible from outside your work LAN? It's very insecure, though.
– GiantTree
Mar 8 '16 at 17:48












Yes, my work pc is connected to the Internet and I'm not sure whether the ssh server is accessible outside, I'm using the putty distribution and also tried bitvise ssh client.
– user15171
Mar 8 '16 at 17:55




Yes, my work pc is connected to the Internet and I'm not sure whether the ssh server is accessible outside, I'm using the putty distribution and also tried bitvise ssh client.
– user15171
Mar 8 '16 at 17:55












@user15171 you missunderstood GiantTree what he tries to point out to you is that to actually beeing able to setup an ssh connection your HomePC needs to have a working Internet Connection.
– konqui
Jul 5 '17 at 10:56




@user15171 you missunderstood GiantTree what he tries to point out to you is that to actually beeing able to setup an ssh connection your HomePC needs to have a working Internet Connection.
– konqui
Jul 5 '17 at 10:56












From user Valentyn: Here is a very good answer to your question if you have ssh access to the work machine.
– fixer1234
Nov 17 at 0:52




From user Valentyn: Here is a very good answer to your question if you have ssh access to the work machine.
– fixer1234
Nov 17 at 0:52










2 Answers
2






active

oldest

votes

















up vote
1
down vote



accepted










You need to take a look at your port forwarding: SSH uses port 22, and you need to set up your router(s)/modem with the necessary port forwarding rules so that this port is forwarded to the IP your home PC have on the LAN.



I cannot give a more detailed explanation without any info, but you can find many resources here: http://portforward.com/






share|improve this answer




























    up vote
    0
    down vote













    What operating system is the SSH server at work you are trying to access using? If there is host-based firewall software on your work system, e.g., Microsoft Windows firewall software or a host-based firewall that may be part of an antivirus and security package, e.g., if it is a Windows system or, perhaps,iptables, if it is a Linux system, you will need to configure that firewall software to allow incoming connections on TCP port 22, the standard port used by Secure Shell (SSH) connections, assuming that the work system is functioning as an SSH server listening on the standard port. If you have access to another system at your work location and can put SSH client software on it, e.g., PuTTY, you can test that there is no host-based firewall software blocking access to the system that is functioning as the SSH server from any IP address, though it the firewall software could still be configured to grant access only from certain systems on the LAN and not accessible from any IP address on the Internet.



    Your work LAN will have a router/firewall at the demarcation point between that LAN and the Internet. That router or firewall will need to have a firewall rule set to allow incoming connections on port 22, again assuming your work system is listening on the standard SSH port, to reach your work SSH server. Unless you work for a large company or organization, I'd suspect that you have private IP addresses in use on the LAN. You can check that by determining if the IP address of your SSH server is in any of these IPv4 private IP address ranges. If so, then the router/firewall will need to perform network address translation (NAT) to translate an external IP address for the firewall router to the one for the internal SSH server. The exact procedure for performing the needed translation, so that the incoming SSH connection is routed to your work system will depend on the manufacturer and model of the firewall or router that needs to be configured. If there is some other SSH server at your work location that needs to be accessible on the standard port, port 22, you will need to reconfigure the system you wish to connect to so that it listens on another port, if your work location has only one public IP address.



    You can test if there is some server accessible via port 22 at the work location, by using an external test tool. There are many sites on the Internet that will allow you to scan for open ports or test connectivity to a particular port or ports. E.g., you could use the Port Forwarding Tester. Put in the externally visible IP address of your system at the work location, i.e., the one that systems on the Internet see, which you could determine by visiting a site such as WhatIsMyIP using a browser on a work system, and the SSH port, port 22. That tester will at least show you if there is some system listening on port 22 at the work location that is accessible from the Internet. If only the system you wish to reach is functioning as an SSH server at the work location, then you've determined if it is reachable. But it is possible that the router/firewall is itself configured to be accessible externally via SSH, so getting a positive answer doesn't necessarily imply that you are communicating on port 22 with the system you wish to reach. But a negative answer, i.e., no response on port 22, may indicate that a firewall rule or port forwarding needs to be configured on the router/firewall.






    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%2f1050233%2finternet-connection-via-ssh%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








      up vote
      1
      down vote



      accepted










      You need to take a look at your port forwarding: SSH uses port 22, and you need to set up your router(s)/modem with the necessary port forwarding rules so that this port is forwarded to the IP your home PC have on the LAN.



      I cannot give a more detailed explanation without any info, but you can find many resources here: http://portforward.com/






      share|improve this answer

























        up vote
        1
        down vote



        accepted










        You need to take a look at your port forwarding: SSH uses port 22, and you need to set up your router(s)/modem with the necessary port forwarding rules so that this port is forwarded to the IP your home PC have on the LAN.



        I cannot give a more detailed explanation without any info, but you can find many resources here: http://portforward.com/






        share|improve this answer























          up vote
          1
          down vote



          accepted







          up vote
          1
          down vote



          accepted






          You need to take a look at your port forwarding: SSH uses port 22, and you need to set up your router(s)/modem with the necessary port forwarding rules so that this port is forwarded to the IP your home PC have on the LAN.



          I cannot give a more detailed explanation without any info, but you can find many resources here: http://portforward.com/






          share|improve this answer












          You need to take a look at your port forwarding: SSH uses port 22, and you need to set up your router(s)/modem with the necessary port forwarding rules so that this port is forwarded to the IP your home PC have on the LAN.



          I cannot give a more detailed explanation without any info, but you can find many resources here: http://portforward.com/







          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered Mar 8 '16 at 19:02









          Jarmund

          4,56942146




          4,56942146
























              up vote
              0
              down vote













              What operating system is the SSH server at work you are trying to access using? If there is host-based firewall software on your work system, e.g., Microsoft Windows firewall software or a host-based firewall that may be part of an antivirus and security package, e.g., if it is a Windows system or, perhaps,iptables, if it is a Linux system, you will need to configure that firewall software to allow incoming connections on TCP port 22, the standard port used by Secure Shell (SSH) connections, assuming that the work system is functioning as an SSH server listening on the standard port. If you have access to another system at your work location and can put SSH client software on it, e.g., PuTTY, you can test that there is no host-based firewall software blocking access to the system that is functioning as the SSH server from any IP address, though it the firewall software could still be configured to grant access only from certain systems on the LAN and not accessible from any IP address on the Internet.



              Your work LAN will have a router/firewall at the demarcation point between that LAN and the Internet. That router or firewall will need to have a firewall rule set to allow incoming connections on port 22, again assuming your work system is listening on the standard SSH port, to reach your work SSH server. Unless you work for a large company or organization, I'd suspect that you have private IP addresses in use on the LAN. You can check that by determining if the IP address of your SSH server is in any of these IPv4 private IP address ranges. If so, then the router/firewall will need to perform network address translation (NAT) to translate an external IP address for the firewall router to the one for the internal SSH server. The exact procedure for performing the needed translation, so that the incoming SSH connection is routed to your work system will depend on the manufacturer and model of the firewall or router that needs to be configured. If there is some other SSH server at your work location that needs to be accessible on the standard port, port 22, you will need to reconfigure the system you wish to connect to so that it listens on another port, if your work location has only one public IP address.



              You can test if there is some server accessible via port 22 at the work location, by using an external test tool. There are many sites on the Internet that will allow you to scan for open ports or test connectivity to a particular port or ports. E.g., you could use the Port Forwarding Tester. Put in the externally visible IP address of your system at the work location, i.e., the one that systems on the Internet see, which you could determine by visiting a site such as WhatIsMyIP using a browser on a work system, and the SSH port, port 22. That tester will at least show you if there is some system listening on port 22 at the work location that is accessible from the Internet. If only the system you wish to reach is functioning as an SSH server at the work location, then you've determined if it is reachable. But it is possible that the router/firewall is itself configured to be accessible externally via SSH, so getting a positive answer doesn't necessarily imply that you are communicating on port 22 with the system you wish to reach. But a negative answer, i.e., no response on port 22, may indicate that a firewall rule or port forwarding needs to be configured on the router/firewall.






              share|improve this answer

























                up vote
                0
                down vote













                What operating system is the SSH server at work you are trying to access using? If there is host-based firewall software on your work system, e.g., Microsoft Windows firewall software or a host-based firewall that may be part of an antivirus and security package, e.g., if it is a Windows system or, perhaps,iptables, if it is a Linux system, you will need to configure that firewall software to allow incoming connections on TCP port 22, the standard port used by Secure Shell (SSH) connections, assuming that the work system is functioning as an SSH server listening on the standard port. If you have access to another system at your work location and can put SSH client software on it, e.g., PuTTY, you can test that there is no host-based firewall software blocking access to the system that is functioning as the SSH server from any IP address, though it the firewall software could still be configured to grant access only from certain systems on the LAN and not accessible from any IP address on the Internet.



                Your work LAN will have a router/firewall at the demarcation point between that LAN and the Internet. That router or firewall will need to have a firewall rule set to allow incoming connections on port 22, again assuming your work system is listening on the standard SSH port, to reach your work SSH server. Unless you work for a large company or organization, I'd suspect that you have private IP addresses in use on the LAN. You can check that by determining if the IP address of your SSH server is in any of these IPv4 private IP address ranges. If so, then the router/firewall will need to perform network address translation (NAT) to translate an external IP address for the firewall router to the one for the internal SSH server. The exact procedure for performing the needed translation, so that the incoming SSH connection is routed to your work system will depend on the manufacturer and model of the firewall or router that needs to be configured. If there is some other SSH server at your work location that needs to be accessible on the standard port, port 22, you will need to reconfigure the system you wish to connect to so that it listens on another port, if your work location has only one public IP address.



                You can test if there is some server accessible via port 22 at the work location, by using an external test tool. There are many sites on the Internet that will allow you to scan for open ports or test connectivity to a particular port or ports. E.g., you could use the Port Forwarding Tester. Put in the externally visible IP address of your system at the work location, i.e., the one that systems on the Internet see, which you could determine by visiting a site such as WhatIsMyIP using a browser on a work system, and the SSH port, port 22. That tester will at least show you if there is some system listening on port 22 at the work location that is accessible from the Internet. If only the system you wish to reach is functioning as an SSH server at the work location, then you've determined if it is reachable. But it is possible that the router/firewall is itself configured to be accessible externally via SSH, so getting a positive answer doesn't necessarily imply that you are communicating on port 22 with the system you wish to reach. But a negative answer, i.e., no response on port 22, may indicate that a firewall rule or port forwarding needs to be configured on the router/firewall.






                share|improve this answer























                  up vote
                  0
                  down vote










                  up vote
                  0
                  down vote









                  What operating system is the SSH server at work you are trying to access using? If there is host-based firewall software on your work system, e.g., Microsoft Windows firewall software or a host-based firewall that may be part of an antivirus and security package, e.g., if it is a Windows system or, perhaps,iptables, if it is a Linux system, you will need to configure that firewall software to allow incoming connections on TCP port 22, the standard port used by Secure Shell (SSH) connections, assuming that the work system is functioning as an SSH server listening on the standard port. If you have access to another system at your work location and can put SSH client software on it, e.g., PuTTY, you can test that there is no host-based firewall software blocking access to the system that is functioning as the SSH server from any IP address, though it the firewall software could still be configured to grant access only from certain systems on the LAN and not accessible from any IP address on the Internet.



                  Your work LAN will have a router/firewall at the demarcation point between that LAN and the Internet. That router or firewall will need to have a firewall rule set to allow incoming connections on port 22, again assuming your work system is listening on the standard SSH port, to reach your work SSH server. Unless you work for a large company or organization, I'd suspect that you have private IP addresses in use on the LAN. You can check that by determining if the IP address of your SSH server is in any of these IPv4 private IP address ranges. If so, then the router/firewall will need to perform network address translation (NAT) to translate an external IP address for the firewall router to the one for the internal SSH server. The exact procedure for performing the needed translation, so that the incoming SSH connection is routed to your work system will depend on the manufacturer and model of the firewall or router that needs to be configured. If there is some other SSH server at your work location that needs to be accessible on the standard port, port 22, you will need to reconfigure the system you wish to connect to so that it listens on another port, if your work location has only one public IP address.



                  You can test if there is some server accessible via port 22 at the work location, by using an external test tool. There are many sites on the Internet that will allow you to scan for open ports or test connectivity to a particular port or ports. E.g., you could use the Port Forwarding Tester. Put in the externally visible IP address of your system at the work location, i.e., the one that systems on the Internet see, which you could determine by visiting a site such as WhatIsMyIP using a browser on a work system, and the SSH port, port 22. That tester will at least show you if there is some system listening on port 22 at the work location that is accessible from the Internet. If only the system you wish to reach is functioning as an SSH server at the work location, then you've determined if it is reachable. But it is possible that the router/firewall is itself configured to be accessible externally via SSH, so getting a positive answer doesn't necessarily imply that you are communicating on port 22 with the system you wish to reach. But a negative answer, i.e., no response on port 22, may indicate that a firewall rule or port forwarding needs to be configured on the router/firewall.






                  share|improve this answer












                  What operating system is the SSH server at work you are trying to access using? If there is host-based firewall software on your work system, e.g., Microsoft Windows firewall software or a host-based firewall that may be part of an antivirus and security package, e.g., if it is a Windows system or, perhaps,iptables, if it is a Linux system, you will need to configure that firewall software to allow incoming connections on TCP port 22, the standard port used by Secure Shell (SSH) connections, assuming that the work system is functioning as an SSH server listening on the standard port. If you have access to another system at your work location and can put SSH client software on it, e.g., PuTTY, you can test that there is no host-based firewall software blocking access to the system that is functioning as the SSH server from any IP address, though it the firewall software could still be configured to grant access only from certain systems on the LAN and not accessible from any IP address on the Internet.



                  Your work LAN will have a router/firewall at the demarcation point between that LAN and the Internet. That router or firewall will need to have a firewall rule set to allow incoming connections on port 22, again assuming your work system is listening on the standard SSH port, to reach your work SSH server. Unless you work for a large company or organization, I'd suspect that you have private IP addresses in use on the LAN. You can check that by determining if the IP address of your SSH server is in any of these IPv4 private IP address ranges. If so, then the router/firewall will need to perform network address translation (NAT) to translate an external IP address for the firewall router to the one for the internal SSH server. The exact procedure for performing the needed translation, so that the incoming SSH connection is routed to your work system will depend on the manufacturer and model of the firewall or router that needs to be configured. If there is some other SSH server at your work location that needs to be accessible on the standard port, port 22, you will need to reconfigure the system you wish to connect to so that it listens on another port, if your work location has only one public IP address.



                  You can test if there is some server accessible via port 22 at the work location, by using an external test tool. There are many sites on the Internet that will allow you to scan for open ports or test connectivity to a particular port or ports. E.g., you could use the Port Forwarding Tester. Put in the externally visible IP address of your system at the work location, i.e., the one that systems on the Internet see, which you could determine by visiting a site such as WhatIsMyIP using a browser on a work system, and the SSH port, port 22. That tester will at least show you if there is some system listening on port 22 at the work location that is accessible from the Internet. If only the system you wish to reach is functioning as an SSH server at the work location, then you've determined if it is reachable. But it is possible that the router/firewall is itself configured to be accessible externally via SSH, so getting a positive answer doesn't necessarily imply that you are communicating on port 22 with the system you wish to reach. But a negative answer, i.e., no response on port 22, may indicate that a firewall rule or port forwarding needs to be configured on the router/firewall.







                  share|improve this answer












                  share|improve this answer



                  share|improve this answer










                  answered Mar 8 '16 at 19:07









                  moonpoint

                  4,10221016




                  4,10221016






























                       

                      draft saved


                      draft discarded



















































                       


                      draft saved


                      draft discarded














                      StackExchange.ready(
                      function () {
                      StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f1050233%2finternet-connection-via-ssh%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

                      Probability when a professor distributes a quiz and homework assignment to a class of n students.

                      Aardman Animations

                      Are they similar matrix