I
I
infi2010-12-09 16:15:14
SSH
infi, 2010-12-09 16:15:14

Logging SSH commands to debian lenny

There is a server with debian, from time to time people go there under the root and perform certain actions, the question is: what is the best way to do it so that all the commands entered via SSH are logged? (OpenSSH5)

Answer the question

In order to leave comments, you need to log in

7 answer(s)
V
Vladimir Chernyshev, 2010-12-09
@infi

Have a look at Snoopy Logger or grsecurity .
From a cannon to sparrows, of course, but, it seems, your task should be solved

Y
Yoda33, 2010-12-09
@Yoda33

Ruth can do everything. Anderstand?

D
Dmitry Koshelenko, 2010-12-09
@GomelHawk

In debian, ssh seems to write to /var/log/auth.log by default...

B
Bodik, 2010-12-09
@Bodik

On CentOS, I did it via /root/.bashrc like this:

export HISTTIMEFORMAT='%Y.%m.%d-%T :: ' HISTFILESIZE=5000 HISTSIZE=5000
export HISTCONTROL=erasedups
PROMPT_COMMAND='history 1 >> /${HOME}/.allhist'

With Debian, I worked a little, but I think the difference will not be big.

B
bagyr, 2010-12-09
@bagyr

blog.rootshell.be/2009/02/28/bash-history-to-syslog/

V
Vladimir Chernyshev, 2010-12-10
@VolCh

Post back as success :)

P
PingMe, 2010-12-10
@PingMe

With us, all this was sent by syslog to a neighboring server :)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question