2

This is my setup, local network with a laptop and a raspberrypi.

I have SSH enabled (port forwarding setup ok, no-ip account setup ok) but when I try to connect to the SSH-raspberry externally, it fails. Of course when connecting through local network it works (laptop connecting to raspberry on locl network), but here is the odd thing:

When trying to access from external network, through an Android device (4.2) using Juice SSH, it seems to find the server but keeps prompting for password....it displays "Authentication failed" again and again... do you have any ideas?

  • Make sure you have a public IP. Most of the ISPs nowadays use NAT and hence that might be the problem. Hope it helps. – dhruvvyas90 Sep 2 '15 at 7:15
  • Dastaan meant Carrier Grade NAT. So it is similar to NAT but at the ISP level. Check your public IP on the router, does it belong to a private IP range (en.m.wikipedia.org/wiki/Private_network)? If yes your provider is using CG NAT, and this is going to be difficult to circumvent. – Huygens Sep 2 '15 at 8:31
  • Try to setup an SSH banner with a specific text (see here cyberciti.biz/tips/change-openssh-sshd-server-login-banner.html). This text is displayed just before the login prompt. When you try to connect again, do you see this message? If yes and after the login fails, what do you see in the system logs? Check /var/log/messages or run sudo journalctl. Without more info from the failure on the server side it will be hard to help you! Also explain us how you setup your test for external connection? – Huygens Sep 2 '15 at 8:36
  • 1
    Try using verbose (ssh -v user@host) mode when connecting locally and remotely and compare. Provide more information on how you're connecting (e.g. ssh client, OS on remote device). Are you using pubauth or passwords? Your last paragraph is confusing. Are you able to ssh into your laptop or into the RPi from your laptop? – bobstro Sep 2 '15 at 13:24
  • Hi bobstro, agree, here is the clarification: I am trying to log into SSH in my raspberry pi from an Android device (4.2) using JuiceSSH – melev Sep 3 '15 at 17:51
1

thank you all for your time... this was a rather dumb issue:

Something odd was happening with port forwarding: even as the local ip was correctly mapped to my raspberry, I could not reach it (my local network was reachable from outside, I checked this with other device) ... so I erased the raspberry local ip mapping, captured it again.... and it is working like a charm. Must have been some bad behavior from my damn modem.

Again, thanks for all your answers.

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.