Ignore certain hosts in last log
Clash Royale CLAN TAG#URR8PPP
up vote
0
down vote
favorite
I have an ansible job that uses ssh
to perform tasks on many servers. It uses an authorized key to gain entry. When I run the last
command it just shows a long list of root logins from the ansible host.
root@myserver:/# last
root pts/1 ansiblehost.mydomain Tue Jan 2 7:00 - 7:00 (00:00)
root pts/1 ansiblehost.mydomain Tue Jan 2 8:00 - 8:00 (00:00)
root pts/1 ansiblehost.mydomain Tue Jan 2 9:00 - 9:00 (00:00)
root pts/1 ansiblehost.mydomain Tue Jan 2 10:00 - 10:00 (00:00)
root pts/1 ansiblehost.mydomain Tue Jan 2 11:00 - 11:00 (00:00)
I would like to suppress these entries from occurring because it fills up the screen and prevents me from investigating who has been logging in to the server.
Alternately, I would accept a way to set up my own logging of authentication for certain groups. For instance, if a user, who is in the admin group, logs in (ssh
or terminal) it will make an entry in a log file /var/log/logins.log
.
authentication pam last
add a comment |Â
up vote
0
down vote
favorite
I have an ansible job that uses ssh
to perform tasks on many servers. It uses an authorized key to gain entry. When I run the last
command it just shows a long list of root logins from the ansible host.
root@myserver:/# last
root pts/1 ansiblehost.mydomain Tue Jan 2 7:00 - 7:00 (00:00)
root pts/1 ansiblehost.mydomain Tue Jan 2 8:00 - 8:00 (00:00)
root pts/1 ansiblehost.mydomain Tue Jan 2 9:00 - 9:00 (00:00)
root pts/1 ansiblehost.mydomain Tue Jan 2 10:00 - 10:00 (00:00)
root pts/1 ansiblehost.mydomain Tue Jan 2 11:00 - 11:00 (00:00)
I would like to suppress these entries from occurring because it fills up the screen and prevents me from investigating who has been logging in to the server.
Alternately, I would accept a way to set up my own logging of authentication for certain groups. For instance, if a user, who is in the admin group, logs in (ssh
or terminal) it will make an entry in a log file /var/log/logins.log
.
authentication pam last
add a comment |Â
up vote
0
down vote
favorite
up vote
0
down vote
favorite
I have an ansible job that uses ssh
to perform tasks on many servers. It uses an authorized key to gain entry. When I run the last
command it just shows a long list of root logins from the ansible host.
root@myserver:/# last
root pts/1 ansiblehost.mydomain Tue Jan 2 7:00 - 7:00 (00:00)
root pts/1 ansiblehost.mydomain Tue Jan 2 8:00 - 8:00 (00:00)
root pts/1 ansiblehost.mydomain Tue Jan 2 9:00 - 9:00 (00:00)
root pts/1 ansiblehost.mydomain Tue Jan 2 10:00 - 10:00 (00:00)
root pts/1 ansiblehost.mydomain Tue Jan 2 11:00 - 11:00 (00:00)
I would like to suppress these entries from occurring because it fills up the screen and prevents me from investigating who has been logging in to the server.
Alternately, I would accept a way to set up my own logging of authentication for certain groups. For instance, if a user, who is in the admin group, logs in (ssh
or terminal) it will make an entry in a log file /var/log/logins.log
.
authentication pam last
I have an ansible job that uses ssh
to perform tasks on many servers. It uses an authorized key to gain entry. When I run the last
command it just shows a long list of root logins from the ansible host.
root@myserver:/# last
root pts/1 ansiblehost.mydomain Tue Jan 2 7:00 - 7:00 (00:00)
root pts/1 ansiblehost.mydomain Tue Jan 2 8:00 - 8:00 (00:00)
root pts/1 ansiblehost.mydomain Tue Jan 2 9:00 - 9:00 (00:00)
root pts/1 ansiblehost.mydomain Tue Jan 2 10:00 - 10:00 (00:00)
root pts/1 ansiblehost.mydomain Tue Jan 2 11:00 - 11:00 (00:00)
I would like to suppress these entries from occurring because it fills up the screen and prevents me from investigating who has been logging in to the server.
Alternately, I would accept a way to set up my own logging of authentication for certain groups. For instance, if a user, who is in the admin group, logs in (ssh
or terminal) it will make an entry in a log file /var/log/logins.log
.
authentication pam last
edited Jan 31 at 19:31
aliceinpalth
760116
760116
asked Jan 31 at 16:49
paxamus
443
443
add a comment |Â
add a comment |Â
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f421014%2fignore-certain-hosts-in-last-log%23new-answer', 'question_page');
);
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password