ที่ บริษัท ของฉันเมื่อฉันเข้าสู่เซิร์ฟเวอร์บางแห่งการเข้าสู่ระบบครั้งล่าสุดของฉันและแบนเนอร์ขนาดใหญ่จะปรากฏขึ้น:
me@my-laptop$ ssh the-server
Last login: Mon Feb 8 18:54:36 2016 from my-laptop.company.com
************************************************************************
* *
* C O M P A N Y I N F O R M A T I O N S Y S T E M S *
* *
* !WARNING! Your connection has been logged !WARNING! *
* *
* This system is for the use of authorized personnel only. *
* Individuals using this *computer system without authorization, *
* or in excess of their authority as determined by the Company *
* Code of Ethics and Acceptable Use Policy, are subject to having all *
* of their activities on this system monitored, recorded and/or *
* terminated by system personnel. *
* If such monitoring reveals possible evidence of criminal activity, *
* Company may provide said evidence to law enforcement officials, *
* in compliance with its confidentiality obligations and all *
* applicable national laws/regulations with regards to data privacy. *
* *
* This device is maintained by Company Department *
* admin@company.com *
************************************************************************
me@the-server$
แน่นอนฉันไม่ต้องการให้แบนเนอร์ขนาดใหญ่นี้ปรากฏขึ้นทุกครั้งที่ฉันเข้าสู่ระบบ แต่ฉันต้องการให้เวลาการเข้าสู่ระบบครั้งล่าสุดและโฮสต์ปรากฏขึ้น
หากฉันใช้touch ~/.hushlogin
แบนเนอร์จะไม่ปรากฏขึ้น แต่ฉันจะสูญเสีย
ข้อมูลการเข้าสู่ระบบล่าสุดเช่นกัน อันที่จริงไม่มีอะไรปรากฏขึ้น:
ssh the-server
me@the-server$
ฉันจะลบแบนเนอร์ได้อย่างไร แต่ต้องใช้เวลาในการเข้าสู่ระบบและโฮสต์ล่าสุดเช่นนี้:
ssh the-server
Last login: Mon Feb 8 18:54:36 2016 from my-laptop.company.com
me@the-server$
last -w | grep "$USER" | head -n1 | perl -lane 'END{print "Last login: @F[3..6] $F[8] from $F[2]"}'
เพราะlastlog
ตัดทอนชื่อโฮสต์ของฉัน