Ubuntu: Allow remote ssh access


I have recently upgraded my home wifi to an eeros mesh network. I am now trying to configure my desktop (ubuntu 14.06) to allow remote ssh access.

I have installed openssh-server, changed the access port in the sshd_config file, and I can run ssh -p ##### localhost successfully. However when I try ssh -p ##### user@ip.address, I get a connection refused (doesn't work on port 22 either).

I have followed the configuration here (https://thepcspy.com/read/making-ssh-secure/), which prior to having the mesh network worked just fine.

Any help is much appreciated.


"Connection refused" is a generic socket error message, nothing exclusively related to ssh. Possible reasons:

  • No process (service) on the remote server is listening on the specified port for any incoming connection, sshd in this case (on the specified port)

  • The highly unlikely case is that the process itself is having internal issue(s) to process the incoming socket() request

So, at first make sure the IP address and the port number are correct; then check if any process is actually listening on the given port for incoming connection on the remote server.


Most probably firewall is running. check iptables status,

service ssh status  

if running add rule to iptables:

iptables -A INPUT -m state --state NEW -m tcp -p tcp --dport $PORT_NUMBER -j ACCEPT  

Note:If u also have question or solution just comment us below or mail us on toontricks1994@gmail.com
Next Post »