If your client is a laptop, try to connect when connected to the local LAN. This will verify whether sshd is working on the server. We aren't sure where your laptop is. Is it plugged into the same LAN as the server. Does the laptop have an IP address on the same subnet as the server?
If you are connecting from across the Internet , and the server is behind a NAT router or firewall, then you need to make sure that your router or firewall forwards port 22 to your ssh server's IP address. If the address you connect to is different than the server's IP address, the router has no way of knowing which host you want to connect to.
One useful test is to try to connect using telnet. See whether an ssh banner is printed. When you see that you have a configuration problem.
For ssh server problems:
Please post your /etc/ssh/sshd_config file. Check the permissions of your home directory on the server and the .ssh subdirectory. If the permissions are too lax, sshd may refuse to allow a connection.
Using sshd -vv to connect will print debug messages for both the client and server.
Check the servers /etc/hosts.allow and /etc/hosts.deny files. Also check AllowUsers in sshd_config.
Last edited by jschiwal; 08-14-2012 at 12:57 AM.
|