Fix PuTTY Network Error: Connection Refused while Connecting to Ubuntu Server

I installed SQL Server 2017 on Ubuntu server and tried to connect to this server using PuTTY from my local host. I failed to connect and received PuTTY fatal error ubuntu ssh connection refused. Read this tip to fix this PuTTY Network Error : Connection Refused.

Network error: Ubuntu ssh Connection Refused

I faced ubuntu connection refused error while establishing a connection to Ubuntu Linux virtual machine from host computer. I installed PuTTY on my host and tried to connect to Ubuntu Linux machine. Let’s check the IP of Ubuntu server that we had used to make connection from PuTTY terminal. Run ipconfig command to get these details.

#Check IP of Ubuntu Server
ipconfig

We can see the IP details of the Ubuntu server that is showing 192.168.209.134. We have used this IP to establish server connection and end up with this PuTTY fatal error.

I tried to connect to Ubuntu server post getting IP from above command but I got ubuntu ssh connection refused error during this operation. The details of PuTTY Fatal Error that caused ubuntu connection refused is given below.

PuTTY Fatal Error
Network error: Connection Refused

Solution

We faced ubuntu ssh connection refused error and failed to connect to Ubuntu Server remotely using PuTTY terminal because SSH, or Secure Shell is not installed on the Ubuntu server. SSH, or Secure Shell, is a protocol used to securely log onto remote systems. Our next step is to install SSH on the Ubuntu server. Run below command to start this installation.

#Install SSH on Ubuntu Server
sudo apt-get install openssh-server

It will check the dependencies and ask you to type y to proceed with the installation as shown in below image.

A series of all required packages will download and set up to install SSH. Once SSH will be installed on your Ubuntu server it will look like below image.

You can also reconfirm the installation by executing same command which you ran to install it. You can say, it is saying newest version is already installed on this server.

Now launch PuTTY terminal on your host computer or a computer from where you want to connect to the Ubuntu server and enter IP address of Ubuntu server to establish connection. Once you click on connect button, you will get a window for the very first time only. Click on Yes button of that window to proceed. Once you will click on Yes button you will be connected to your Ubuntu server remotely.

Now we can see putty connection refused error is fixed and we can connect to Ubuntu server remotely using PuTTY terminal. If you want to change configurations of SSH you can refer to attached document. This way you can fix ubuntu ssh connection refused error.

Here, we have fixed ubuntu putty connection refused error. I hope you like this article. Please follow us on our facebook page and on Twitter handle to get latest updates.

Summary
Article Name
Fix PuTTY Network Error: Connection Refused while Connecting to Ubuntu Server
Description
I installed SQL Server 2017 on Ubuntu server and tried to connect to this server using PuTTY from my local host. I failed to connect and received PuTTY fatal error ubuntu ssh connection refused. Read this tip to fix such PuTTY Network error: Connection Refused.
Author
Publisher Name
Techyaz.com
Manvendra Deo Singh: I am working as a Technical Architect in one of the top IT consulting firm. I have expertise on all versions of SQL Server since SQL Server 2000. I have lead multiple SQL Server projects like consolidation, upgrades, migrations, HA & DR. I love to share my knowledge. You can contact me on my social accounts for any consulting work.
Related Post
Leave a Comment