°Ô½Ã¹° 1,369°Ç
   
»ç¿ëÀÚº° ¼¼¼Ç ·Î±×
±Û¾´ÀÌ : ÃÖ°í°ü¸®ÀÚ ³¯Â¥ : 2024-04-12 (±Ý) 11:16 Á¶È¸ : 517
±ÛÁÖ¼Ò :
                                
https://unix.stackexchange.com/questions/139874/local-timestamped-logging-of-all-ssh-commands/145297#145297

# /etc/bash.bashrc
PROMPT_COMMAND='history -a >(tee -a ~/.bash_history | logger -t "$USER[$$] $SSH_CONNECTION")'
# source /etc/bash.bashrc
# /etc/rsyslog.conf
*.*;auth,authpriv.none.local6           -/var/log/syslog
local6.info /var/log/histor.log
# touch /var/log/history.log && /etc/init.d/rsyslog restart

À̸§ Æнº¿öµå
ºñ¹Ð±Û (üũÇÏ¸é ±Û¾´À̸¸ ³»¿ëÀ» È®ÀÎÇÒ ¼ö ÀÖ½À´Ï´Ù.)
¿ÞÂÊÀÇ ±ÛÀÚ¸¦ ÀÔ·ÂÇϼ¼¿ä.
   

 



 
»çÀÌÆ®¸í : ¸ðÁö¸®³× | ´ëÇ¥ : ÀÌ°æÇö | °³ÀÎÄ¿¹Â´ÏƼ : ·©Å°´åÄÄ ¿î¿µÃ¼Á¦(OS) | °æ±âµµ ¼º³²½Ã ºÐ´ç±¸ | ÀüÀÚ¿ìÆí : mojily°ñ¹ðÀÌchonnom.com Copyright ¨Ï www.chonnom.com www.kyunghyun.net www.mojily.net. All rights reserved.