My first attempt to solve this problem would be to
- open PuTTY
- select Session > Logging
- enable logging of SSH output to a file
- try to connect
- review the logfile
What does the logfile say? Anything that points you into a specific direction? It could me messages ranging from "Connection timed out" to "Access denied".
Connection timed out:
Make sure you really have the correct IP address and TCP port given in PuTTY's session options. If you are using a hostname instead of the IP address, make sure that the hostname resolves to the correct IP address. Eventually also check
Do you administer the SSH server? If so, make sure that SSH really listens on port 22; if not, either change
/etc/ssh/sshd_config on the server or adjust the port in PuTTY. Also check that
iptables will let your client's IP address pass through.
If you do not administer the SSH server, get in touch with the administrator.
I personally like to install
knockd on my SSH servers, so that I can only connect to them after knocking certain ports. Ask the administrator whether you have to do something like that.
If you try to login as
root, chances are, that this is forbidden in
/etc/ssh/sshd_config on the server. Login with another / your username.
If you are using public key authentication, make sure that your private key
- is in PuTTY's
- is entered in PuTTY's Connection > SSH > Auth section.
Also check whether the corresponding public key is in
/home/yourusername/.ssh/authorized_keys. Make sure that there are no line breaks (I am using
nano for that, and it sometimes adds linebreaks if I copy the key into it). A correct line should read like that, for instance for RSA:
ssh-rsa ALOTOFCHARACTERS yourusername@hostname.
So. First step: enable logging and post the output here. ;)