I have an ssh account on a server. Someone is spamming me with write messages. So I can't run any command in an interactive login. Is there anyway I can prevent them from sending me write messages or any way I could just have a session without incoming write messages and do my things? I think they are just sending write messages to my usernames to whatever terminal I login with (pts/1 2 3 4 and so on) I don't want to contact the system admin for this.


From man 1 write:

You can prevent people (other than the superuser) from writing to you with the mesg(1) command. Some commands, for example nroff(1) and pr(1), may automatically disallow writing, so that the output they produce isn't overwritten

From man 1 mesg:

mesg [option] [n|y]

Therefore, running mesg n should disable this.

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.