Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

2 Questions

  1. In the following command, does echo foo get logged anywhere on an Ubuntu server?

    # remote server us running Ubuntu 12.04
    $ ssh username@xxx.xxx.xxx.xxx "echo foo"

  2. If yes to #1, how do I find echo foo in the remote server's logs and/or history?

Notes

  • After running the command from question #1, when I SSH into the server, and run history, I don't see echo foobarin the history. I can however see previous commands I typed in manually from the command line during previous remote login sessions.

  • I also tried running these 3 commands:

    $ ssh username@xxx.xxx.xxx.xxx "history > foo.txt"

    $ ssh username@xxx.xxx.xxx.xxx "echo foo; history > foo.txt"

    $ ssh username@xxx.xxx.xxx.xxx "echo foo && history > foo.txt"

    In each case, foo.txt was just an empty text file.

share|improve this question
    
I've wondered this myself and came to the same conclusion as you. It does not appear in the .bash_history of the user, at least. It would be good to confirm if it appears anywhere else, but I suspect not. AS for your comment on the 3 commands below, are you looking at foo.txt in the present working directory of your local host? –  Peter Dec 25 '13 at 1:11

1 Answer 1

Answer to #1: No: this is not logged anywhere by default on an Ubuntu 12.04 server.

Additional note: please read about the suggestion to install snoopy on your Ubuntu server.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.