4

When I am logged into my home Linux machines via SSH, I get the following debug output a few times every minute:

debug2: channel 0: request window-change confirm 0

When I am editing files in nano, the debug message is displayed over top of the text. To remove the debug message, I have to close nano, execute clear, and then re-open the file. I get this whether I am using Secure Shell (Google Chrome extension), PuTTY, or Terminator (from local machine), though it's far worse on the former two.

Is there some way to suppress these messages? Will executing sshd -q do it, or is the debug output level specified during the compilation process?

  • 1
    Not a way to prevent the messages, but if you use Ctrl-L, nano should redraw the screen and get rid of the "junk", without needing to exit and reopen the file. – Anthon Apr 20 '16 at 20:36
  • I edited /etc/init/ssh.conf to add the -q option to sshd -D and restarted ssh. I then confimed that sshd is really running with -q option, it is. I'm still getting the messages though, so I suppose that doesn't suppress the debug2 messages. The man page is typically vague: -q Quiet mode. Causes most warning and diagnostic messages to be suppressed – Andy Forceno Apr 20 '16 at 20:47
5

sshd is the daemon. You'd want to use the -q flag with the client (ssh).

When connecting to your home machines, include the -q flag in the ssh command (i.e. ssh -q user@host). Alternatively, if that doesn't work, you could try redirecting stderr to /dev/null by connecting to your home machines like ssh user@host 2> /dev/null.

  • Thanks, I completely spaced on that. Adding -q flag to Secure Shell seems to work. Haven't tried it with the other clients, yet, but I don't see why it wouldn't work with them, too. – Andy Forceno Apr 21 '16 at 15:22
5

In my case, I was using

ssh -vv 

to see the detailed debug info and that was the reason why the server was showing

debug2: channel 0: request window-change confirm 0

in the terminal. I quit the shell and then again connected to bash without verbose (-vv) and the problem disappeared.

1

Set LogLevel INFO in your server /etc/ssh/sshd_config. It should hide the most of messages. Also search for other occurrences of this option in that file.

  • I've changed the LogLevel to ERROR. I'm not entirely sure why debug2 messages are being output when LogLevel is set to INFO though, there is a separate level, DEBUG2, for that, it seems (assuming I correctly understand the purpose of DEBUG2). – Andy Forceno Apr 21 '16 at 16:31
  • @AWildColin some of the log messages go also to the client at some condition. But yes, generally you are right. – Jakuje Apr 21 '16 at 18:40

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.