• Welcome to TechPowerUp Forums, Guest! Please check out our forum guidelines for info related to our community.

Clear terminal for ssh?

Joined
Aug 26, 2013
Messages
149 (0.03/day)
Location
NL
System Name Helios
Processor AMD Ryzen 7 5800X3D @ stock
Motherboard MSI X470 Gaming Pro Carbon
Cooling Corsair iCUE H150i RGB Pro XT
Memory 32GB Corsair Vengeance Pro RGB DDR4-3200
Video Card(s) MSI GeForce RTX 3090 Suprim
Storage 1TB SN850x, 1TB 980, 2x 2TB 870Evo
Display(s) AOC CU34G2X + 2x Iiyama E2483HS
Case In-Win 303
Audio Device(s) Teufel Concept C 200 USB & Schiit Fulla 2 w/ HIFIMan HE400se
Power Supply Corsair RM1000
Mouse Logitech G502 Proteus Spectrum
Keyboard Corsair K70 Pro (Brown sw.)
Software Arch Linux
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?
 
if I understand you correctly "clear" is the command you want
put it "bashrc" for your selected usergroup
 
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.
 
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.
Yeah i meant users SSH-ing in. I have Mint because i also use it as a desktop regularly.
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.
 
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 :

Code:
#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 :

Code:
source .bashrc

upload_2015-1-30_18-43-5.png
 

Attachments

  • upload_2015-1-30_18-42-40.png
    upload_2015-1-30_18-42-40.png
    26.5 KB · Views: 330
Last edited:
Back
Top