• 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
148 (0.04/day)
Location
NL
System Name Helios
Processor AMD Ryzen 5 2600 @ 4.0
Motherboard MSI X470 Gaming Pro Carbon
Cooling Corsair iCUE H150i RGB Pro XT
Memory 16GB Corsair Vengeance Pro RGB DDR4-3200
Video Card(s) Gigabyte Geforce GTX 1080 G1 Gaming
Storage 256GB Hynix Pc401 & 3TB of HDD storage
Display(s) AOC CU34G2X + 2x Iiyama E2483HS
Case In-Win 303
Audio Device(s) Teufel Concept C 200 USB & Schiit Fulla 2 w/ Beyerdynamic DT 990 Pro 250Ohm
Power Supply Corsair RM1000
Mouse Logitech G502 Proteus Spectrum
Keyboard Logitech G512
Software Windows 10
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

There is Always Moar
Joined
Apr 9, 2010
Messages
8,739 (1.72/day)
Location
Rochester area
System Name RPC MK2.5
Processor Ryzen 5800x
Motherboard Gigabyte Aorus Pro V2
Cooling Enermax ETX-T50RGB
Memory CL16 BL2K16G36C16U4RL 3600 1:1 micron e-die
Video Card(s) GIGABYTE RTX 3070 Ti GAMING OC
Storage ADATA SX8200PRO NVME 512GB, Intel 545s 500GBSSD, ADATA SU800 SSD, 3TB Spinner
Display(s) LG Ultra Gear 32 1440p 165hz Dell 1440p 75hz
Case Phanteks P300 /w 300A front panel conversion
Audio Device(s) onboard
Power Supply SeaSonic Focus+ Platinum 750W
Mouse Kone burst Pro
Keyboard EVGA Z15
Software Windows 11 +startisallback
if I understand you correctly "clear" is the command you want
put it "bashrc" for your selected usergroup
 

Easy Rhino

Linux Advocate
Staff member
Joined
Nov 13, 2006
Messages
15,435 (2.44/day)
Location
Mid-Atlantic
System Name Desktop
Processor i5 13600KF
Motherboard AsRock B760M Steel Legend Wifi
Cooling Noctua NH-U9S
Memory 4x 16 Gb Gskill S5 DDR5 @6000
Video Card(s) Gigabyte Gaming OC 6750 XT 12GB
Storage WD_BLACK 4TB SN850x
Display(s) Gigabye M32U
Case Corsair Carbide 400C
Audio Device(s) On Board
Power Supply EVGA Supernova 650 P2
Mouse MX Master 3s
Keyboard Logitech G915 Wireless Clicky
Software The Matrix
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.
 
Joined
Aug 26, 2013
Messages
148 (0.04/day)
Location
NL
System Name Helios
Processor AMD Ryzen 5 2600 @ 4.0
Motherboard MSI X470 Gaming Pro Carbon
Cooling Corsair iCUE H150i RGB Pro XT
Memory 16GB Corsair Vengeance Pro RGB DDR4-3200
Video Card(s) Gigabyte Geforce GTX 1080 G1 Gaming
Storage 256GB Hynix Pc401 & 3TB of HDD storage
Display(s) AOC CU34G2X + 2x Iiyama E2483HS
Case In-Win 303
Audio Device(s) Teufel Concept C 200 USB & Schiit Fulla 2 w/ Beyerdynamic DT 990 Pro 250Ohm
Power Supply Corsair RM1000
Mouse Logitech G502 Proteus Spectrum
Keyboard Logitech G512
Software Windows 10
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.
 
Joined
Oct 24, 2004
Messages
1,294 (0.18/day)
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: 303
Last edited:
Joined
Nov 10, 2006
Messages
4,665 (0.74/day)
Location
Washington, US
System Name Rainbow
Processor Intel Core i7 8700k
Motherboard MSI MPG Z390M GAMING EDGE AC
Cooling Corsair H115i, 2x Noctua NF-A14 industrialPPC-3000 PWM
Memory G. Skill TridentZ RGB 4x8GB (F4-3600C16Q-32GTZR)
Video Card(s) ZOTAC GeForce RTX 3090 Trinity
Storage 2x Samsung 950 Pro 256GB | 2xHGST Deskstar 4TB 7.2K
Display(s) Samsung C27HG70
Case Xigmatek Aquila
Power Supply Seasonic 760W SS-760XP
Mouse Razer Deathadder 2013
Keyboard Corsair Vengeance K95
Software Windows 10 Pro
Benchmark Scores 4 trillion points in GmailMark, over 144 FPS 2K Facebook Scrolling (Extreme Quality preset)
Top