Fix :: Linux SSH error "connection refused"

Problem Statement


Can't connect to a Linux server(Debian Flavour) via SSH.

Error Message


Connection refused

Solution


There were unknown changes made in  /etc/ssh/ssh_configfile. To fix this issue, we had installed OpenSSH server following below mentioned steps:

  1. Logged into VPS through console and fired following commands:

    sudo apt-get purge openssh-server
    mv /etc/ssh /etc/ssh_old
    created new ssh directory in /etc
    sudo apt-get install openssh-server​
  2. Try ssh after performing above steps. If you get "WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED", rename the known_hosts from .ssh/ in your local machine and try again.

  • 0 Users Found This Useful

Was this answer helpful?

Related Articles

R1Soft : An error occurred while loading the hcpdriver module

R1soft CDP backup allows for full server backup and you can use it to perform the bare metal...

How to change timezone from Joomla admin panel?

Changing timezone is very easy in Joomla. Please refer to the below steps to change timezone from...

How To Install EPEL Repo on CentOS and RHEL 7?

EPEL stands for Extra Packages for Enterprise Linux. It is very easy to install additional...

How to Setup NTP Server in CentOS?

NTP enables the automatically sync your system time with a remote server. With the help of NTP...

5 Wget Command Examples to Download Files in Linux.

wget is used to download your files from the remote server. It is used mostly on Linux...