LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   "Shared connection to host closed." (https://www.linuxquestions.org/questions/linux-software-2/shared-connection-to-host-closed-4175441628/)

AntiMS 12-15-2012 11:29 PM

"Shared connection to host closed."
 
Hello. This is not my first post, but I don't remember the username I used to use and apparently used an old email address. So, it's a new account for me.

I have a need to remotely administrate a Windows 7 machine. (I know. It's LinuxQuestions.org, not WindowsQuestions.org... but bear with me... please?) Having much more experience with Linux than Windows and knowing the amount of power Linux utilities would give me for administrating the box, I installed Cygwin and OpenSSH.

Given the bandwidth and latency considerations, I'll be using a ControlMaster ssh connection and running various ssh-related commands (such as bash, port forwarding, scp, etc) through that.

I've got it all set up, and it all works except for one thing.

I set up the master connection with:
Code:

ssh -fCNMS /tmp/ssh.sock user@host
I can run a remote shell with:
Code:

ssh -S /tmp/ssh.sock user@host
However, if I end the remote shell (with ctrl-d or "exit") and try to run it through the same master connection again, I get the following:
Code:

> ssh -vvv -s /tmp/ssh.sock user@host
openssh_5.9p1-hpn13v11, openssl 1.0.0j 10 may 2012
debug1: reading configuration data /home/localuser/.ssh/config
debug1: reading configuration data /etc/ssh/ssh_config
debug2: fd 3 setting o_nonblock
debug2: mux_client_hello_exchange: master version 4
debug3: mux_client_request_forwards: requesting forwardings: 0 local, 0 remote
debug3: mux_client_request_session: entering
debug3: mux_client_request_alive: entering
debug3: mux_client_request_alive: done pid = 6976
debug3: mux_client_request_session: session request sent
warning: untrusted x11 forwarding setup failed: xauth key data not generated
warning: no xauth data; using fake authentication data for x11 forwarding.
debug1: mux_client_request_session: master session id: 2
x11 forwarding request failed
last login: sat dec 15 23:07:49 2012 from 192.168.1.101
debug3: mux_client_read_packet: read header failed: broken pipe
debug2: received exit status from master 255
shared connection to host closed.

Also, I can copy files to the remote machine with:
Code:

scp -o ControlMaster=no -o ControlPath=/tmp/ssh.sock file.txt user@host:/tmp
However, doing that a second time fails with the message "lost connection".

Closing the master connection and restarting the connection lets me open a shell or scp a file again.

I'm not sure whether it's a client or server issue, but even though the server is on Cygwin, I imagine you folks will have an idea what's up.

Thanks in advance for your help!

AntiMS 12-18-2012 06:13 PM

Hmm. Well, I guess the OpenSSH mailing list might be the place to take this question, then. Thanks for reading, anyway. :)

hulyom 04-11-2018 12:57 PM

Just for the record:
I've the same issue but resolved by changing package name.

Better explanation:
- environment: Ansible server = Centos 7, Ansible client = ArchLinux
- Issue: an ArchLinux package changed its name
- Resolution: Changed the package name to its new name in the specific Ansible Playbook


All times are GMT -5. The time now is 03:33 PM.