SSH is failing - Connection closed by error

VENKATARAMAN SIVASUBRAMANIAN 1 Reputation point
2021-09-09T19:37:23.527+00:00

Azure VM instance

I am able to do nc -v {ip} 22. I can see it is connected from my laptop.

But when I use putty, I see "Connection closed by" error

debug1: Local version string SSH-2.0-OpenSSH_for_Windows_8.1
debug1: Remote protocol version 2.0, remote software version OpenSSH_7.2p2 Ubuntu-4ubuntu2.10
debug1: match: OpenSSH_7.2p2 Ubuntu-4ubuntu2.10 pat OpenSSH_7.0*,OpenSSH_7.1*,OpenSSH_7.2*,OpenSSH_7.3*,OpenSSH_7.4*,OpenSSH_7.5*,OpenSSH_7.6*,OpenSSH_7.7* compat 0x04000002
debug1: Authenticating to 1.2.3.4:22 as 'php-applications'
debug1: SSH2_MSG_KEXINIT sent
Connection closed by 1.2.3.4 port 22

{IP Address is modified for security purpose}

a. I have changed MTU from 1500 to 1300, 1200 - does not work.
b. I have changed MTU to 9000 for jump frames. still does not work.

this has been working fine for sometime and suddenly, users are unable to login

c. I have generated new keys and tried. does not work
d. I have tried ssh command line from windows passing pem file, ppk file - nothing works.

any help please. I am stuck and unable to login to vm.

Azure App Service
Azure App Service
Azure App Service is a service used to create and deploy scalable, mission-critical web apps.
7,155 questions
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. VENKATARAMAN SIVASUBRAMANIAN 1 Reputation point
    2021-09-10T01:05:17.93+00:00

    Did anyone face this issue ?. I am sure, there must be some solution to fix this. I am stuck and need someone to help

    0 comments No comments

  2. brtrach-MSFT 15,531 Reputation points Microsoft Employee
    2021-09-13T02:38:09.44+00:00

    @VENKATARAMAN SIVASUBRAMANIAN , We are sorry to hear that SSH is not working as expected.

    Can you please see if SSH is enabled? You can do that by using the Azure VM Serial Console. Once you have that configured, try running ps -aux | grep ssh

    If that does not work, I would suggest going through this SSH troubleshooting guide that we have put together, which you can find here.

    Please let us know the outcome of the above troubleshooting steps. If you resolve the issue, please reply back here so others in the community can be helped. If you still need assistance after trying the above steps, please reply to my message and we would be happy to continue troubleshooting with you.

    We look forward to your reply.

    0 comments No comments