I have recently installed ubuntu server (12.0.4) and intend to use it primarily as a file server. I am completely new to linux so this is a pretty big learning curve. Yesterday I was able to configure PuTTy on my Windows 7 machine using an ssh key pair so that I can administer ubuntu server from my desktop. This works fine provided that both machines are on the same network.
In the case of my laptop (MacBook Air) it might not always be on the same network, is it possible to be able to connect to the ubuntu server from my laptop via ssh when it is on a different network?
I have installed avahi daemon so that the hostname for the server is broadcast on the LAN and configured the router so that it will always assign the same IP to the server. Apart from that the only thing I have installed on the server is openssh where I have disabled password authentication so that you can only connect using a key pair.
I thought I would be able to do something like this from the terminal on my laptop:
ssh my.external.ip.address email@example.com
When I try that command I get the following error: ssh: connect to host my.external.ip.address port 22: operation timed out
I have also tried
ssh my.external.ip.address firstname.lastname@example.org
and I get the same error message as before. So that should give you an idea of what I am trying to do but currently I do not know if this is possible and if it is how to do it. Any instructions to configure this would be appreciated, thanks.
I should also add that assuming I can set up an external connection via ssh from my laptop, there is a possibility that my ISP will change my external IP which would break the external connection. I would like to be able to connect robustly that is; if my ISP changes the external IP I would still be able to connect remotely to the server without having to know what the new external IP address is.