# Clear terminal for ssh?



## ypoora1 (Sep 30, 2014)

Is there any way co clear the ssh-ing user´s terminal when ¨issue(.net)¨ shows up? Iḿ trying to make my little usage disclaimer a bit more... Noticable. Running linux Mint 17 on a desktop/server tower.

Oh, and where is the ¨motd¨ in Mint stored anyway?


----------



## OneMoar (Sep 30, 2014)

if I understand you correctly "clear" is the command you want
put it "bashrc" for your selected usergroup


----------



## Guitar (Sep 30, 2014)

http://www.linux.com/learn/tutorials/741573-put-a-talking-cow-in-your-linux-message-of-the-day/

Looks like it has where MOTD is. 'Clear' clears your terminal obviously, but you want that to run every time something runs?


----------



## Easy Rhino (Sep 30, 2014)

Are you talking about when a user opens a new terminal session remotely or when they open a terminal session after they have already logged into the GUI? The reason I ask is that you brought up you are using Mint.

If a user has already authenticated into your system using a GUI and opens a terminal they WILL NOT SEE the motd or issue.net

If they are accessing a terminal session remotely they will see whatever you put in /etc/motd or /etc/issue.net or both if you have them both setup.

This is because motd is for AFTER a user authenticated a remote terminal session and issue.net if for BEFORE a user attempts to authenticate.


----------



## ypoora1 (Sep 30, 2014)

Easy Rhino said:


> Are you talking about when a user opens a new terminal session remotely or when they open a terminal session after they have already logged into the GUI? The reason I ask is that you brought up you are using Mint.
> 
> If a user has already authenticated into your system using a GUI and opens a terminal they WILL NOT SEE the motd or issue.net
> 
> ...


Yeah i meant users SSH-ing in. I have Mint because i also use it as a desktop regularly.


OneMoar said:


> if I understand you correctly "clear" is the command you want
> put it "bashrc" for your selected usergroup


Did that, and it seems to work. How does one add colored text to issue.net and motd? I tried the ANSI thing, but in all my terminal emulators it either shows the actual code on screen or makes garbled junk. Sorry if i'm missing stupid things, but i'm a complete noob to that.


----------



## blobster21 (Jan 30, 2015)

ypoora1 said:


> Did that, and it seems to work. How does one add colored text to issue.net and motd? I tried the ANSI thing, but in all my terminal emulators it either shows the actual code on screen or makes garbled junk. Sorry if i'm missing stupid things, but i'm a complete noob to that.



I played with my own .bashrc and this is how i added a message whenever a terminal is called :


```
#Add those lines on top of .bashrc to set a welcome message before the terminal prompt
lightblue='\e[1;34m'
neutral='\e[0;m'
echo -e "${lightblue}Welcome $LOGNAME${neutral},use this terminal wisely ;o) "
```

Then you can reload .bashrc settings to see immediate changes in your terminal, using :


```
source .bashrc
```


----------



## xvi (Jan 30, 2015)

Guitarrassdeamor said:


> http://www.linux.com/learn/tutorials/741573-put-a-talking-cow-in-your-linux-message-of-the-day/


I did something similar where it would provide a BOFH excuse to give the boss in case you broke something.
"Hard drives spinning backwards - hemisphere jumper incorrectly set"


----------

