タグ

sshとlogに関するiyodaxのブックマーク (1)

  • ssh上で行った作業のログをとる - もぎゃろぐ

    linuxサーバにログインしていろいろしたとき、翌日になって何かまずいことをしでかした事に気づく(でもログがないから何をしたかわからない)ということがままある。というわけでlinuxサーバにsshでログインして何かしたとき、すべてログに残すノウハウ。もうあちこちで紹介されているけど、自分用メモということで。 ~/.bash_profileに下記を追加 # .bash_profile # Get the aliases and functions if [ -f ~/.bashrc ]; then . ~/.bashrc fi # User specific environment and startup programs PATH=$PATH:$HOME/bin export PATH unset USERNAME # keep everything in the lo

  • 1