On ubuntu 14.04 I have installed openssh, changed the ssh port. I can login within LAN with no problems, but I cannot access it from outside.

I also have: allowed it though firewall and set up port forwarding on my linksys router

Whenever I login, I get the error (I have replaced # instead of numbers):

ssh: connect to host #.#.#.# port #: Can't assign requested address

What else can I check, what could be wrong? Please help.

1 Answer 1


This might not fix your issue but I had the same error on OSX after it working successfully before. Flushing the routing table helped:

sudo ifconfig en0 down # take the networking interface down
sudo route flush # flush the route table
sudo ifconfig en0 up # take the interface back online

I ran these on the computer that I was connecting from. Reference: http://codefromabove.com/quickies/osx-cant-assign-requested-address-code49/

  • 3
    Hello ! Can you explain us why we have to flush the route ?? thank's
    – I'm_ADR
    Dec 19, 2016 at 14:03
  • 2
    @I'm_ADR because your routing table gets corrupted from time to time. There are different reasons for it but one might be using OpenVPN on poor networks.
    – Saba Ahang
    Nov 13, 2018 at 14:49

You must log in to answer this question.

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