I am using SSH to connect from Ubuntu to a Raspberry (hostname "pi0alby"). It worked fine for months. Now, at beginning of the day, login starts fine but session is closed quite fast as:

. --- --- /etc/motd --------------------(this is the end of MOTD message)-------- .
No mail.
Last login: Fri Oct 16 11:24:23 2020 from
sebas@pi0alby:~ $ Connection to r0 closed.

The command I use normally is "ssh sebas@r0", where r0 is the IP of pi0alby in /etc/hosts.

After some googling, I found "-t" flag for ssh, so after the error, I launch "ssh -t sebas@r0" and it seems to work.

The "-t" flag it says is "Force pseudo-terminal allocation"

If I have a problem with "pseudo-terminal allocation", what can I do to debug this problem ?

I monitor "/var/log/auth.log", "/var/log/messages", but nothing special shows up.

Any clue is welcome.

  • mr Zevzek - you are half right : (1) I do use an alias, (2) it has no additional shell commands in it - the alias is "alias r0='ssh sebas@r0'" Oct 16, 2020 at 11:15
  • It's quite obvious you are right, but II have no clue what am I missing. Let me say a detail : I call "alias r0='ssh sebas@r0" and this second "r0" is a line in /etc/hosts, cotaining the IP of the destination. Let me try again next time the problem comes with a "straight" and simple line. Many thanks for your help, mr Zevzek Oct 29, 2020 at 20:55

1 Answer 1


Run the ssh command in "triple verbose" mode:
ssh -vvv sebas@r0
This will show you diagnostic messages from the ssh command.

You can also tail /var/log/messages and /var/log/secure on the r0 server as you are trying the ssh command.

You will most likely find something interesting.
It would also be bneficial to do the same on a server that does work and compare the outputs.

You must log in to answer this question.

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