On 31 Aug 21:18, Chris G wrote:
On Sun, Aug 31, 2008 at 09:07:30PM +0100, Barry Samuels wrote:
My SSH is set up to work via a key only i.e. no logins.
I can use SSH from my laptop to connect to my desktop over my home network with no problems however if I try it via the Internet, when away from home, I get 'access denied (Publickey)'.
Would there be a known reason for that?
Is it possibly that your router isn't allowing the ssh packets through?
That would be a different message, such as connection denied or connection timedout.
Or is the ssh server set up to allow only connections from the local network?
See above.
Or (and I think this *is* probably the answer) does your laptop have a different address when connecting from 'outside'? The ssh keys you have set up allow connections from specific hosts so a connection set up that works when the laptop has a local IP address will not work when the laptop has an IP address given to it by some other network.
Very unlikely to be the answer. Infact, incredibly unlikely. Given that I do just that rather often from this laptop, heck, I even tunnel other ssh connections through ssh connections that use that from this laptop.
Now, the correct questions to ask would be: * Have you checked the backend of the auth.log on the server * Have you tried running ssh with the -vvvv option to get lots of shiny debug output * Is this the same laptop both inside and outside the network * Have you got a special ~/.ssh/config entry for that desktop
With that we might be able to give a slightly better answer and not stab around in the dark.
Thanks,