1

I'm finding that upon exit from an ssh session on a CentOS 7 server, it clears the screen each time. I suspect that there's a setting in /etc for the environment that is doing this.

Any ideas of what's triggering this?

2
  • 1
    Check if your /etc/zlogout contains clear. The cls is a DOS/Windows-ism.
    – jscott
    Sep 7, 2017 at 23:02
  • Perfect, that did the trick. You're right that clear was in /etc/zlogout and upon commenting out it's great now.
    – ylluminate
    Sep 8, 2017 at 0:13

1 Answer 1

0

This is most likely the shell on the machine that you are connecting to doing this. For instance, if you are connecting from host1 to host2 via ssh and you try both bash and zsh on host1 but host2 is still using bash in both scenarios then most likely there is a .bash_logout on host2 that contains a clear command in it, remove it and your problem is solved.

You must log in to answer this question.

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