Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
すべてのユーザーが ssh セッションで自動的に入力したコマンドをログに記録し、ログ ファイルに記録する方法はありますか?
ubuntu サーバー 12.04 を使用しています。
あいさつ ホワイト
同じために「scripts」コマンドを使用できます。基本的に、システムにある各ユーザーのプロファイルファイル(プロファイルファイル/home/user/.bash_profile)にコマンド「script -a」を追加します。
スクリプトはコマンド出力もファイルにダンプするため、ユーザーはセッションを閉じるために exit を 2 回実行する必要があることに注意してください。
詳細については、「man スクリプト」を参照してください。
よろしく、 ジャイナ