As far as I understood your question, on one side you're trying to connect to a Linux system thru ssh using putty appliication, while on the other side, you're invoking ssh cmd (from an another Linux system's console) to connect to that Linux box... Right?
If this is the case, then note that both works differently. Possibly, ssh
cmd is missing in your path variable when trying it in console. And as you said that you found ssh
using which ssh
then you should add it's absolute path in your path variable (under /etc/profile or /etc/.bashrc file).
However, provide result of following cmds:
~$ which ssh
~$ echo $PATH