Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I have two laptops that both run on ubuntu and installed ssh server and ssh client on them. One is usually on my desk at home and one I usually bring to my company. When I'm at home I can easily ssh to one from the other by typing this command (to login to the other laptop whose IP address is: 192.168.0.105) :

ssh -p 22 myusername@192.168.0.107 

However, When I'm at my company, I try to type the same command and ofcourse it doesn't work. I understand that when at home I'm on LAN network, that my laptops actually using my ISP's address which differ from 192.168.0.107 asummed 203.113.131.1. So could you tell me what IP that ssh shoud use for my laptop (at work) to connet to my computer at home?

Thank you.

share|improve this question
add comment

1 Answer

port forwarding

This will be a job for port forwarding on your router at home.

You will need to redirect inbound traffic on your home router on a certain port (say 2022) to your home laptop on port 22.

Then you will be able to connect to your router on 203.113.131.1:2022 and it will be forwarded to your home laptop (192.168.0.107:22).


Static IP

Setting up a static IP on your home laptop will make sure that you will not get a new IP address and break the above awrup.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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