Core issue
This problem ocuurs most commonly when the device ( to which the user is trying to connect using telnet and ssh ) dosen't have the proper user credentials or there is a connectivity problem to the device.
Resolution
To resolve this issue, perform these steps:
First check that the remote device to which the user is trying to connect is having the proper login credentials for that paticular user. If proper credentials is not found ,configure it accordingly.
After the above configuration check that the remote device is responding by issuing the ping command. If , yes the connectivity is ok and the user can go ahead and do a telnet or ssh.