1

I can't get the SSH to work on my Raspbian Raspberry Pi (it is enabled). I am port forwarding the pi's external IP to port 22 but putty says the connection has been refused. I'm a beginner as far as networking goes so please excuse any silly mistakes if there are any.

I am also new to stack exchange as well so if I need to provide more information please don't hesitate to ask.

  • Please provide us with more information. How are you forwarding? iptables or something like it? Please explain the paths from client to server, listing the forwarders. – Marco Poli Apr 30 '14 at 2:24
  • I'm actually forwarding using my verizon router. I haven't changed anything on the pi. – Alex Apr 30 '14 at 2:35
  • 1
    Are you trying to ssh to the Pi from a computer that is connected to the same router as the Pi ? – Lawrence Apr 30 '14 at 3:10
  • I am but I want to be able to connect from anywhere, which is why I'm forwarding the external IP. I can connect while on my wifi. – Alex Apr 30 '14 at 3:15
  • Port forwarding usually only works on packets coming into the the router from the internet, not on local packets. Try it from the neighbors internet connection, or use a online ssh client (be sure to change the password afterwards, as you shouldn't trust these 3rd parties with you ssh-credentials). – Gerben Apr 30 '14 at 14:20
1

see if this port is open.....mostly your ssh demon is not running. see if sshd is running. If not then start it.

Do you have sshd installed?You can verify that using :

  which ssh
  which sshd

Make sure that /etc/hosts.allow contains:

  ssh:ALL:allow
  sshd:ALL:allow

OR

  ssh:localhost:allow
  sshd:localhost:allow

OR - some other variant

  ssh:{host1,host2,host3...}:allow
  sshd{host1,host2,host3...}:allow

INSURE that the first line in the file DOES NOT begin with ALL:ALL:DENY

NOTHING will be able to communicate with the host... on any port.

this post has links to other related pages

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.