Ubuntu – packet_write_wait: Connection to xxx port 3591: Broken pipe

sshUbuntu

I realise this question was asked before, but I couldn't find a solution to my problem so far.
I was logged into a remote server using ssh, when I decided to log out using

sudo pkill -KILL -u user

After that I was not able to connect to the server using ssh. I am getting a prompt asking for the password, which I put in. After that I get

packet_write_wait: Connection to xxx port 3591: Broken pipe

I already set ClientAliveInterval 60 and restarted the sshd using service sshd restart, without any success.

The server and the client are both running Ubuntu 16.04.

Best Answer

killing ? your ssh session with the way you describe in your question ...well isn't that great, ie. there are more graceful ways to terminate / logout of an ssh server.

I really like using keyboard shortcuts when I can, and I almost exclusively use, control + d to gracefully logout of a remote box using ssh.

The below command will also log the current logged in user.

exit

A scenario I often run into is when I login to a remote box and and the session get terminated abruptly, and I can not input any text into my terminal, thus a "hanging / dangling process" to get out of this state, I use the below keyboard shortcut.

alt + shift + .

Related Question