Question

cant ssh to my service in certain network

I can ssh to my vps at home,but it did not work when I wanted to connect it through my lab computer.when I ssh by xshell it showed : Socket error Event: 32 Error: 10053. Connection closing…Socket close. Connection closed by foreign host.

also by using shadowsock as a vpn,I could connect to the service when used the computer at home or phone in wifi condition.but fail to connect on my lab computer or phone in 4G network


Submit an answer

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.

It is possible that when you created your Droplet, you had an SSH key saved into your DO account (https://cloud.digitalocean.com/account/security).

These SSH keys are usually device specific, meaning that while the public key (~/.ssh/id_rsa.pub) is stored on your DO account, the private key is only on your computer at home. I assume the ‘lab’ computer is a class (shared) computer, which means you could put your private key on it (~/.ssh/id_rsa). Although you should probably give some thought to how secure the shared computer is first, as that key could provide direct access to your VPS.