SSH Connection Exception resolution documentary (Shared connection to xxx.xxx.xxx.xxx closed.)

Source: Internet
Author: User
Tags ssh
Author: fbysss
QQ: Wine bar Bar I scattered
Blog:blog.csdn.net/fbysss

Disclaimer: This article by fbysss original, reproduced please indicate the source

problem: connect to server, before all good, suddenly error: Shared connection to xxx.xxx.xxx.xxx closed.

background: Client for Mac Pro,term 2, configured with ~/.ssh/config

Troubleshooting:

1. Try other tools, too. But the hints are not quite the same. For example SECURECRT directly did not respond, Xshell hint A and X11 related east, estimate are crooked floor.

2. It was discovered that Root could be connected. Creates a new user or can connect from a client.

3. Try the server switch to SSS user su-sss, an error message appears: Su:failed to Execute/bin/bash: resource temporarily unavailable

Vi/etc/security/limits.d/20-nproc.conf the number of the first line is 4096, followed by a 0 plus. Then, you can switch normally. 4. The client is still unable to connect. However, it is possible to annotate two sentences in the ~/.ssh/config. ============================== #ControlMaster Auto #ControlPath ~/.ssh/master-%r@%h:%p Of course, if the comment means that each time SSH has to enter the password again. Obviously not. Well. Analysis, it is estimated that the previous connection has a problem, but also persistent, and then the connection will use a bad connection.
5. So, PS aux |grep master, found a connection, that is, just try to unsuccessful connection.  SSS 8223 0.0 0.0 2471520 684?? Ss 12:07 pm 0:00.00 ssh:/users/sss/.ssh/master-sss@xxx.xxx.xxx.xxx:22 [MUX]
Kill-9 8223 Remove the comment and then connect again, OK. Summary: The above approach temporarily solves the problem, but the root cause needs to be further identified. But from the earliest error hints, to direct answers it is really hard to get directly, so record and share.


Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.