1
votes

I'm getting this error when using Putty:

server unexpectedly closed network connection

I try to connect my EC2 ubuntu 14.04 LTS Instance using putty, and also i generate pem key to ppk key then i upload ppk key in putty and try to connect my Instance.

1
A PuTTY session left idle will disconnect at a time determined by the host server. Try enabling keep-alives 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 which will not time out due to inactivity. - Sinto
what you say i can't under stand - Maulik Kanani
please explain me in step by step - Maulik Kanani
because i am new in AWS - Maulik Kanani
I will post a answer, But I'm not sure about this. Please try. - Sinto

1 Answers

3
votes

To create and save a new keep-alive connection, follow these steps:

  • Open the PuTTY application, and go to the Options panel (labeled "Category") on the left of the window.
  • Select (click) the "Connection" item.
  • 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).
  • Select the "Enable TCP keepalives (SO_KEEPALIVE option)" check box. Note: This option may not be available in older versions of the PuTTY client.
  • On the topmost left side of the Options panel, select (click) "Session".
  • In the "Host Name (or IP Address)" field, enter the destination host name or IP address (e.g., "destination.ipaddress.here.com" or "192.168.1.1").
  • In the "Saved Sessions" text-entry box, provide a name for the session (e.g., "savedsession").
  • Select "Save".

To use the modified session settings, select it from the "Saved sessions" list, then click the buttons marked "Load" and "Open".

If your connected sessions still time out, enter a lower number of seconds into the "Seconds between keepalives" value.

On searching more I also got a point that:

"Uncheck 'Attempt GSSAPI authentication (SSH-2 only)' in Putty: Category - Connection - SSH - Auth - GSSAPI

In my case it seems to be GSSAPI is incompatible to a Ubuntu host that uses Beyond trust (formerly: likewise open)."