0

I have a fresh install of ubuntu 14.04 (latest version supported by the software we need) on a server. SSH is installed and SSHD is running per ps. I can ssh out just fine. At my workstation, I can ping the server but cannot connect via ssh, putty returns “Network error: Connection refused”, I have tried other from other machines and servers and get the same error. I can establish an ssh connection to other devices on the same switch, and opened port 22 on the server via ufw. This is on a local network and everything has a static IP. I should also note that I am not trying the root account, just a normal user with sudo access.

I have never had this issue before. It’s always been set up static IP, install SSH and done. What am I missing here?

0

A few additional suggestions assuming SSHD is properly working:

  1. Reboot the server
  2. Temporarily disable UFW to see if that's an issue
  3. Could be a port forwarding issue
  4. Look into any other causes like if you're using flood control things like fail2ban
|improve this answer|||||
  • Rebooted and still an issue. ufw was not enabled. there are no port forwards on the switch, it's all local and on the same subnet anyway. nothing else is installed, it's a stock install. – Sama Aug 21 '17 at 22:01
0

Thank you everyone, turns out it was an IP address conflict. I had ruled that out because I gave it a new address early in my troubleshooting. The third address worked. So I guess we have two undocumented devices with static IPs to track down. Thank you all again.

|improve this answer|||||
0

I would check TCP Wrappers first and make sure your IP address is not blocked in /etc/hosts.deny or /etc/hosts.allow.

If those files are empty, or don't seem to be the issue, I would reload ufw to make sure your new rule allowing SSH has actually taken effect:

sudo ufw reload

In any case, if it's a server-side issue, you'll probably be able to pull some useful information from the log files. SSHD will generally either log to /var/log/auth.log or /var/log/secure.

Edit: to enable ufw, you'll want to run:

sudo ufw enable

Edit 2: incorporating my comment into the answer for clarity:

Also, check for any devices with duplicate IP addresses on the network. It's possible a different device is receiving the SSH traffic intended for your server. You can shut down your server and try pinging its IP address, or just change IP addresses until it starts working.

|improve this answer|||||
  • there was nothing listed in /etc/hosts.deny or /etc/hosts.allow. I tried to reload ufw but it looks like it was never enabled to start with, returned "Firewall not enabled (skipping reload)". auth.log just had a couple lines of "server listening on 0.0.0.0 port 22" – Sama Aug 21 '17 at 21:55
  • @Sama Hmm. If you're not seeing anything in auth.log, that would indicate to me that your connection attempts are never reaching the server. I would double-check the IP address of your server and make sure there are no other devices with duplicate IP addresses. – Arnon Aug 21 '17 at 22:02

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.