0

I know that this question may have been answered somewhere, but I'm a total noob about this subject and couldn`t follow up on any tutorial. So any help would be appreciated :)

Here's the thing: I can access a computer at the university lab via ssh from home using the command ssh user@universityIp -p 1234 for example. But I can't connect from the university computer to my home machine via ssh.

I already found out that my internet provider blocks port 22, but they told me that they could enable another port superior to 1024. So I asked them to enable port 5678 (for example), even though I had no idea how it could help me. Also, I have already changed the port on the sshd_config file to 5678.

Knowing that my home machine is a Windows 10 running OpenSSHServer, how can I connect from the university computer to my home machine using ssh? Suppose that my public IP is 111.111.11.11 and my intranet IP is 192.168.250.250. Also, is there another thing that I have to change in my sshd_config file?

Sorry if I'm being repetitive, but I have no idea about what I have to do.

0

The IP 111.111.11.11 is the public IP of your home router.
You need to

  • open port 5678 on your home router and
  • enable port forwarding for port 5678 to your internal IP address 192.168.250.250

Then you should be able to connect from your university to your home computer's OpenSSH server running at port 5678 (as you mentioned you already did).

| improve this answer | |
  • I believe that steps 1 and 2 are already done by my internet provider, but I'm getting the Connection closed by remote host error. Just to check, if everything is working, I should type ssh myUser@publicIP -p 5678 to connect to my home machine right? – kmdeoliv Mar 16 at 21:22
  • Why do you believe that steps 1 and 2 have already be done by your provider? Opening port 5678, and also enabling the port forwarding, has to be done by YOU - in your router preferences. However, the command ssh myUser@publicIP -p 5678 is correct. – zx485 Mar 16 at 21:25
  • I searched the options of my router everywhere and I couldn't find the option to open the port and enable port forwarding. So I called my internet provider and they told me that I'm not allowed to change the configurations by myself, but they could do it for me. That's why I believe they already did, even though I don't know if it is possible to check it. – kmdeoliv Mar 16 at 22:07
  • That sounds really horrible :-/ Your internet provider should forward ALL PORTS to your endpoint/IPaddress and ONLY YOU should decide which ports are forwarded to wherever.... Are you in some kind of institution? Because if you can't do it on your router, you're probably out of luck... – zx485 Mar 16 at 22:13
  • No, I'm at home. The problem is my internet provider. I already saw some complaints about them on the internet from people with the same problem. I just thought that after contacting them I should be able to solve it by myself. I just need to send some files from the university lab to my computer :/ Anyway, thanks for your help. – kmdeoliv Mar 16 at 22:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.