3

I can't ssh into my server. The server is on a private network administrated by me. Ubuntu is version 14.04. This started when I changed to a wired ethernet card. The client is MobaXTerm (latest) on Windows 7. This is what I have done:

  • The client can ping the server
  • The server can ping the client
  • I can ssh localhost on the server with no problems
  • ufw status shows port 22 open
  • netstat -l shows port 22 listening

I did a iptable --list but honestly I'm not sure of what I'm seeing. Here are the lines that have ssh in them:

ACCEPT tcp -- anywhere anywhere tcp dpt:ssh
ACCEPT udp -- anywhere anywhere udp dpt:ssh

I'd post the whole output except that I have no good way to get it off the server.

All suggestions are welcome.

5
  • Perhaps the server settings is the issue. I'd review /etc/ssh/sshd_config on the server. You want, at least to start, to allow password authentication with "PasswordAuthentication yes" (that's the default setting).
    – Sean
    May 27, 2014 at 16:50
  • sshd_config has PasswordAuthentication set to yes.
    – ksnortum
    May 27, 2014 at 17:00
  • If possible I'd try your ssh client on a Linux machine to eliminate any question of the issue being with the Windows program. I use Cygwin ssh on Windows to connect to Ubuntu ssh servers but have no experience with MobaXTerm.
    – Sean
    May 27, 2014 at 17:18
  • Cygwin is a bit of overkill =) , I suggest you use PuTTy, it is freely available and portable - chiark.greenend.org.uk/~sgtatham/putty/download.html
    – Panther
    May 27, 2014 at 17:39
  • I've tried PuTTy, same message.
    – ksnortum
    May 27, 2014 at 17:54

5 Answers 5

1

I'm not sure about MobaXterm, but I know PuTTY stores known server SSH fingerprints in the registry, and some versions made it quite difficult to connect to a server if its fingerprint had changed (and weren't very verbose in their diagnostic output).

Could it be that the fingerprint for your server has changed and your terminal program is protecting you from bad things?

3
  • Tried PuTTy, still says "Connection refused"
    – ksnortum
    May 27, 2014 at 18:47
  • Yes, but had you used putty to connect to the server before you changed to a wired connection? If so it could be refusing to let you access because it doesn't match the one stored in the registry.
    – user285808
    May 28, 2014 at 23:08
  • Keys seem to be shared amongst Cygwin, PuTTy, and WinSCP... all of these were refusing my attempts to connect to a server that had changed. Using the IP worked, but I haven't tried to find how to remove the hostname/domain-based key yet. Mar 15, 2016 at 4:50
1

In the past I've had this problem and solved it by using a LAN IP to connect to the server, instead of the domain name or hostname.

0

Perhaps this will work: sudo iptables -A INPUT -p tcp --dport ssh -j ACCEPT

0

Do you have any tcpwrappers ? Start the logging in the server :

tail -f /var/log/auth.log

Try to ssh from the client and paste the error logs.

I think ssh known_hosts is causing the issue. Just backup and clear the known_host file and try again

0

I solved this problem the "old fashioned way": I put a terminal on the server. But I just tried using the XTerminal remotely again and it connected. So we'll chalk this up to "just one of those things."

Thank you to everyone who replied.

You must log in to answer this question.

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