0

I'm trying to connect from a mac (osx 10.14.4) to a linux machine (Ubuntu 18.04.2) through ssh. I'm not an expert in shh, this is my first attempt to use it, but what seems to happen is that the connection works but it stop at the very same moment.

These are the last lines from the verbose shh on the mac

debug1: Authentication succeeded (publickey).
Authenticated to 192.168.1.100 ([192.168.1.100]:22).
debug1: channel 0: new [client-session]
debug1: Requesting [email protected]
debug1: Entering interactive session.
debug1: pledge: network
debug1: client_input_global_request: rtype [email protected] want_reply 0
debug1: Sending environment.
debug1: Sending env LANG = it_IT.UTF-8
debug1: Sending env LC_TERMINAL_VERSION = 3.3.0beta12
debug1: Sending env LC_TERMINAL = iTerm2
packet_write_wait: Connection to 192.168.1.100 port 22: Broken pipe

And this is the status of the ssh service from linux

giu 20 11:07:44 ezabba-Aspire systemd[1]: Stopped OpenBSD Secure Shell server.
giu 20 11:07:44 ezabba-Aspire systemd[1]: Starting OpenBSD Secure Shell server...
giu 20 11:07:44 ezabba-Aspire sshd[29577]: Server listening on 0.0.0.0 port 22.
giu 20 11:07:44 ezabba-Aspire sshd[29577]: Server listening on :: port 22.
giu 20 11:07:44 ezabba-Aspire systemd[1]: Started OpenBSD Secure Shell server.
giu 20 11:11:14 ezabba-Aspire sshd[29891]: Accepted publickey for ezabba from 192.168.1.99 port 49842 ssh2: RSA SHA256: <...>
giu 20 11:11:14 ezabba-Aspire sshd[29891]: pam_unix(sshd:session): session opened for user ezabba by (uid=0)
giu 20 11:11:14 ezabba-Aspire sshd[29891]: pam_unix(sshd:session): session closed for user ezabba

So I'm ignorant but I can see Accepted publickey and session opened for user and immediately after session closed for user but why? I can't understand what I'm doing wrong.

4
  • According to the first debug trace, you're authenticating and then a session starts. The session just terminates immediately. It's as if your shell on the remote system was exiting right after being invoked.
    – Kenster
    Commented Jun 20, 2019 at 11:13
  • So you think the problem is in the client and not in the server, and this is a step forward toward the solution, thanks, but is there a way to know why this happen? ssh -v doesn't show any error
    – luzzuc
    Commented Jun 20, 2019 at 13:02
  • No, I'm saying the problem is likely on the server. Your shell on the remote system may be failing to start or exiting right after being invoked. There are easily half a dozen things that could cause that.
    – Kenster
    Commented Jun 20, 2019 at 15:11
  • Sorry, I misunderstand, english is not my first language... So 'half a dozen things' you say and with no clues to guess which one is, I think it will be very hard to make it work. Anyway thank you for your support
    – luzzuc
    Commented Jun 20, 2019 at 16:49

1 Answer 1

1

I've faced a similar problem and solved it by adding this configuration to ssh config.

Host *
    IPQoS lowdelay throughput
1
  • Can you explain what this does and how/why it might solve this problem?      Please do not respond in comments; edit your answer to make it clearer and more complete. Commented Jun 26, 2019 at 1:59

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .