0

My SSH to GCP keeps on disconnecting too frequently. It disconnects practically every minute and is becoming very frustrating. It has happened only since last week and before that all was working fine. What could be the reason ?

  • 1
    Is it disconnecting when the SSH session is idle for a specific time or does it disconnect randomly? – Thomas Jul 30 '17 at 14:16
  • Which zone is your VM in? Do you know more precisely when the problem started? How do you open the ssh connections? – kasperd Jul 30 '17 at 14:52
  • I opened an ssh connection to a VM and left it alone for hours. After 4 hours it was still connected. So my guess is the problem is likely on your network. Maybe you have NAT or a firewall which drops connections. You should grab a packet capture of the problem as seen from both the client machine and the VM. – kasperd Jul 30 '17 at 21:46
  • You may want to make the connection using the -vvv parameter to have debug info. That will probably point you to the reason for disconnection. If you cannot find a misconfiguration, the you may want to try Mosh which is specifically made to withstand some erratic and heavily filtered networks and may provide relief to your situation. – Pablo Jul 30 '17 at 22:51
  • 1
    Maybe this one -> Intermittent disconnects. Try with a native SSH client or contact Google. – Thomas Jul 31 '17 at 10:10
2

Do you have this issue with only one instance or multiple instances. Did you test creating new instance and use SSH. There are few known issues including intermittent disconnects when connect to GCE VM instance using SSH from the browser. Are you having this issue when connect using other methods?

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.