I have Kubuntu 22.04 and I have some troubles with SSH output in a console. Every SSH command clears console. I even can't check a version of SSH. For instance, this is what I type:

admin@machine:~$ssh -V

And this is a result:


with cleared all previous text. And this is how it behaves for any SSH command (except those which succeed to connect to a remote host).

I searched for similar problems, but I didn'ŧ find anything relevant. I though I have maybe set wrong LogLevel, so I tried to set it to INFO: ssh -o LogLevel=INFO but again I got cleared console without any output. Also verbose options have no impact, I can't debug anything regarding SSH.

But when I connect to a remote host, SSH command works as expected (on the remote host). But as soon as I quit the connection by Ctrl+D, I'm getting cleared console again.

Does anybody know what can be reason of this behavior?

5 Answers 5


Thank you very much guys for your effort and advices. I finally found a problem in .bash_aliases, this piece:

setterm -default -clear rest;

I really don't know how could it appear in aliases, but after I removed it, it started to work as expected. Phew.


Have a look at your shell startup files for the commands that set your prompt (admin@machine:~). I think one of them is telling your terminal to clear its display before showing the prompt.


I are you running Konsole as your console? If so it has it's own Plugin for SSH. You don't have to use it, but it may be useful if you are going to use SSH a lot. Also, Konsole is different than most basic terminals, check the options closely as well as checking what @Sotto Voce said with cat .bashrc or cat .zshrc.

  • Yes, I do use Konsole. I checked .bashrc, but I didn't find anything related to this. I have another machine with Kubuntu 22.04 and I tried co check .bashrc, but they are both the same.
    – Mike
    Jul 7, 2022 at 17:10

I discovered one more thing. I tried to run:

source .bashrc

And subsequently run a ssh command. This leads to an error:

Warning: Program 'bash' crashed.

This error is shown after any ssh command, even ssh -V. But then when I close Konsole, re-open it and try any ssh command, I'm getting cleared console without any message again.


Do you also have a .zshrc file located in the same place as your .bashrc file? Your default shell could be zsh.

I found similar Q&As on StackOverFlow (in the wrong place lol):

I have a feel that this should help you fix the issue.

Stack: Bash commands not working

You must log in to answer this question.

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