-2

I'm trying to SSH to my desktop again after moving to a new house. I had this working before. The problem is, it works perfectly just using the local IP, but then when I use the WAN IP I get password denied:

***.org's password:

Permission denied, please try again.

***.org's password: 

Permission denied, please try again.

***.org's password:

Permission denied (publickey,password).

*** being my domain. But I know my password is right, and it only started not working once moved to my new house, and again it works locally. If I turn off port forwarding then of course it doesn't even connect to the host. So I know it's at least connecting to my desktop, or at least something changes.

So my question is, since it works locally, and stops working altogether when I turn off port forwarding, what can I do to fix this?

3
  • 1
    Can you add the output of ssh -v user@host when connecting to your question? It helps finding the issue.
    – slhck
    May 14, 2011 at 22:52
  • 1
    ssh -vvv will display even more details
    – vtest
    May 14, 2011 at 23:27
  • What are you doing?   Are you trying to connect to your PC from a remote location (like your work, a friend’s house, or an Internet café)?   Or are you trying to connect from within your house, but using the public (WAN) IP address? or using a domain name? May 23, 2019 at 17:32

3 Answers 3

-1

The first place I'd check is the /etc/hosts.allow file. It can limit what IP's have access to your SSH server.

-1

Could it be for several reasons, first could it be due some ACL that is blocking the access to SSH services from different location or some not registered authentication credencials to access using Port 22, could it be a vulnerability on the system as the intranet too that is affecting the access: https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2018-13801 Additionally if is Being used a VPN, PROXY or not local DNS the services can not be reachable or different. If the internet is from a Public ISP the final device is blocking your access!

1
  • Thanks for contributing your thoughts.   It’s going to be difficult to diagnose and solve this problem without the ssh -v output that the OP was asked to provide, but it seems to me that your guesses are not likely to be correct.   If access to the SSH service was blocked, would the ssh client ask for a password three times?   The OP is vague about exactly what happens when he turns off port forwarding, but it sounds like he is connecting to and communicating with the server.   And how is the vulnerability you point to relevant? May 23, 2019 at 17:01
-1

A few things to try:

  1. In your /etc/sshd/sshd_config file, make sure that you have 'PasswordAuthentication' set to 'yes'.

  2. Compare the ssh public key in ~/.ssh/known_hosts for the SSH server on both the local machine you are connecting from and the remote machine that you are trying to connect from. The public key should be the same on both, otherwise you're not connecting to the say server.

  3. Make sure your WAN device is set to do port forwarding on port 22 to your SSH server, otherwise you might be connecting directly to your WAN device.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .