remote side unexpectedly closed network connection

+1 vote

Hi Guys,

I have launched an EC2 instance and able to ping from the command line. But when I am trying to access from putty it's giving an error as shown below.

remote side unexpectedly closed network connection

Even the mapping URL is refused to connect and am not able to access the site.

Aug 27, 2020 in AWS by akhtar
• 38,230 points
46,847 views

1 answer to this question.

0 votes

Hi@akhtar,

A PuTTY session left idle will disconnect at a time determined by the host server. Try enabling keep-alive in PuTTY. This causes PuTTY to send null SSH packets to the remote host periodically, preventing the session from timing out.

The PuTTY client can be configured to always establish a connection that will not time out due to inactivity. To create and save a new keep-alive connection, follow these steps.

  1. Open the PuTTY application, and go to the Options panel (labeled "Category") on the left of the window.

  2. Select (click) the "Connection" item.

  3. In the ​​"Sending of null packets to keep the session active" area on the right, change the default value of "Seconds between keepalives" from 0 (turn off) to 1800 (30 minutes).

  4. Select the "Enable TCP keepalives (SO_KEEPALIVE option)" checkbox. Note: This option may not be available in older versions of the PuTTY client.

  5. On the topmost left side of the Options panel, select (click) "Session".

  6. In the "Host Name (or IP Address)" field, enter the destination hostname or IP address (e.g., "destination.ipaddress.here.com" or "192.168.1.1").

  7. In the "Saved Sessions" text-entry box, provide a name for the session (e.g., "saved session").

  8. Select "Save".

answered Aug 27, 2020 by MD
• 95,360 points

Related Questions In AWS

0 votes
1 answer

AWS Network ELB take 4 minutes to recognise target as healthy

We hit this issue with NLBs and ...READ MORE

answered Sep 5, 2018 in AWS by Priyaj
• 58,080 points
223 views
0 votes
1 answer

Unable to initiate ssh connection to Amazon EC2 instance

The keypair which you are using must ...READ MORE

answered Sep 5, 2018 in AWS by Archana
• 4,150 points
306 views
0 votes
1 answer
0 votes
1 answer

Server unexpectedly closed the connection.

Hi@akhtar, There are many reason to cause this scenario. ...READ MORE

answered Apr 2, 2020 in AWS by MD
• 95,360 points
1,107 views
0 votes
1 answer

Network error: Connection timed out or Error connecting to [instance] in AWS.

Hi@akhtar, Check your security group rules. You need ...READ MORE

answered Apr 28, 2020 in AWS by MD
• 95,360 points
2,252 views
webinar REGISTER FOR FREE WEBINAR X
Send OTP
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP