SSH connection getting refused

Whether on a LAN or not on a LAN, I normally do this:

  1. First install openssh-server on all PCs that will be receiving the SSH connection:

    sudo apt-get install openssh-server
    
  2. Verify that the PC where I just installed openssh-server is accessible. The fastest way is to send it a ping.

ping 192.168.0.100 assuming the IP address is the IP address of my friend's PC. If it appears ok then I proceed with accessing to it. Remember that you need to use an account that already exists on your friend's PC. Normally his own account will do.

ssh [email protected] where friend is your friend's user name.

In a normal scenario this should be enough. Let me know if it works.


When you try and connect, use the -vvv switch to show debug information:

ssh -vvv username@host