Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
SSH login: "Last login:" displayed 2 times...? (DUP)
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Duplicate Threads
View previous topic :: View next topic  
Author Message
DrWilken
Apprentice
Apprentice


Joined: 12 Dec 2003
Posts: 219
Location: Oelsted ("BeerPlace"), Denmark

PostPosted: Tue Dec 09, 2008 11:46 pm    Post subject: SSH login: "Last login:" displayed 2 times...? (DU Reply with quote

As the subject says when I login to my box via SSH I see two "Last login:" lines... 8O

Any ideas...?

Is there a duplicate line somewhere in a config file...?

Code:

Using username "user".
Authenticating with public key "user@mysite.dk"
Last login: Wed Dec 10 00:44:51 CET 2008 from host.mysite.dk on pts/2
Last login: Wed Dec 10 00:47:20 2008 from host.mysite.dk


The first line shows CET all the time too... ??

This only happens when I login via SSH... Not if use the login command... 8O

my sshd_config:
Code:

testframe ~ # cat /etc/ssh/sshd_config
#       $OpenBSD: sshd_config,v 1.80 2008/07/02 02:24:18 djm Exp $

# This is the sshd server system-wide configuration file.  See
# sshd_config(5) for more information.

# This sshd was compiled with PATH=/usr/bin:/bin:/usr/sbin:/sbin

# The strategy used for options in the default sshd_config shipped with
# OpenSSH is to specify options with their default value where
# possible, but leave them commented.  Uncommented options change a
# default value.

#Port 22
#AddressFamily any
#ListenAddress 0.0.0.0
#ListenAddress ::

# Disable legacy (protocol version 1) support in the server for new
# installations. In future the default will change to require explicit
# activation of protocol 1
Protocol 2

# HostKey for protocol version 1
#HostKey /etc/ssh/ssh_host_key
# HostKeys for protocol version 2
#HostKey /etc/ssh/ssh_host_rsa_key
#HostKey /etc/ssh/ssh_host_dsa_key

# Lifetime and size of ephemeral version 1 server key
#KeyRegenerationInterval 1h
#ServerKeyBits 1024

# Logging
# obsoletes QuietMode and FascistLogging
SyslogFacility AUTH
LogLevel INFO

# Authentication:

#LoginGraceTime 2m
PermitRootLogin no
#StrictModes yes
#MaxAuthTries 6
#MaxSessions 10

#RSAAuthentication yes
PubkeyAuthentication yes
AuthorizedKeysFile      .ssh/authorized_keys

# For this to work you will also need host keys in /etc/ssh/ssh_known_hosts
#RhostsRSAAuthentication no
# similar for protocol version 2
HostbasedAuthentication no
# Change to yes if you don't trust ~/.ssh/known_hosts for
# RhostsRSAAuthentication and HostbasedAuthentication
#IgnoreUserKnownHosts no
# Don't read the user's ~/.rhosts and ~/.shosts files
#IgnoreRhosts yes

# To disable tunneled clear text passwords, change to no here!
PasswordAuthentication no
PermitEmptyPasswords no

# Change to no to disable s/key passwords
#ChallengeResponseAuthentication yes

# Kerberos options
#KerberosAuthentication no
#KerberosOrLocalPasswd yes
#KerberosTicketCleanup yes
#KerberosGetAFSToken no

# GSSAPI options
#GSSAPIAuthentication no
#GSSAPICleanupCredentials yes

# Set this to 'yes' to enable PAM authentication, account processing,
# and session processing. If this is enabled, PAM authentication will
# be allowed through the ChallengeResponseAuthentication and
# PasswordAuthentication.  Depending on your PAM configuration,
# PAM authentication via ChallengeResponseAuthentication may bypass
# the setting of "PermitRootLogin without-password".
# If you just want the PAM account and session checks to run without
# PAM authentication, then enable this but set PasswordAuthentication
# and ChallengeResponseAuthentication to 'no'.
UsePAM yes

#AllowAgentForwarding yes
#AllowTcpForwarding yes
#GatewayPorts no
#X11Forwarding no
#X11DisplayOffset 10
#X11UseLocalhost yes
#PrintMotd yes
#PrintLastLog yes
#TCPKeepAlive yes
#UseLogin no
#UsePrivilegeSeparation yes
#PermitUserEnvironment no
#Compression delayed
#ClientAliveInterval 0
#ClientAliveCountMax 3
#UseDNS yes
#PidFile /var/run/sshd.pid
#MaxStartups 10
#PermitTunnel no
#ChrootDirectory none

# no default banner path
#Banner none

# Added by DrWilken - Only users in the sshusers group can ssh into the box.
#AllowGroups sshusers

# override default of no subsystems
Subsystem       sftp    /usr/lib64/misc/sftp-server

# Example of overriding settings on a per-user basis
#Match User anoncvs
#       X11Forwarding no
#       AllowTcpForwarding no
#       ForceCommand cvs server

_________________
-=[DrWilken]=-
ASUS AT5IONT-I (64bit Dual Core Atom D525 processor with Nvidia ION(2) GPU) running Gentoo Linux... Latest and Greatest... :)
tux-power.dk


Last edited by DrWilken on Wed Dec 10, 2008 8:55 am; edited 1 time in total
Back to top
View user's profile Send private message
alex.blackbit
Advocate
Advocate


Joined: 26 Jul 2005
Posts: 2397

PostPosted: Wed Dec 10, 2008 8:34 am    Post subject: Reply with quote

this is a known issue.
turn off "PrintLastLog" in your sshd config, that should fix it. i think the default setting should be "off", maybe i should file a bug about that.
i still do not know what part of the system is responsible for the other line that is printed.
Back to top
View user's profile Send private message
DrWilken
Apprentice
Apprentice


Joined: 12 Dec 2003
Posts: 219
Location: Oelsted ("BeerPlace"), Denmark

PostPosted: Wed Dec 10, 2008 8:52 am    Post subject: Reply with quote

alex.blackbit wrote:
this is a known issue.
turn off "PrintLastLog" in your sshd config, that should fix it. i think the default setting should be "off", maybe i should file a bug about that.
i still do not know what part of the system is responsible for the other line that is printed.


Thx... ;) Didn't find that post when searching... :(

There's a bug report too -> https://bugs.gentoo.org/show_bug.cgi?id=244816


EDIT! -> I followed the advice in the bug report instead... ;)

Commented these 3 lines in /etc/pam.d/system-login:
Code:

session         required        pam_env.so
#session                optional        pam_lastlog.so
session         include         system-auth
#session                optional        pam_motd.so motd=/etc/motd
#session                optional        pam_mail.so
# pam_lastlog.so pam_motd.so and pam_mail.so commented because of Bug #244816

_________________
-=[DrWilken]=-
ASUS AT5IONT-I (64bit Dual Core Atom D525 processor with Nvidia ION(2) GPU) running Gentoo Linux... Latest and Greatest... :)
tux-power.dk
Back to top
View user's profile Send private message
alex.blackbit
Advocate
Advocate


Joined: 26 Jul 2005
Posts: 2397

PostPosted: Wed Dec 10, 2008 12:23 pm    Post subject: Reply with quote

thanks for that bug link.
hopefully this issue is fixed soon.
Back to top
View user's profile Send private message
DrWilken
Apprentice
Apprentice


Joined: 12 Dec 2003
Posts: 219
Location: Oelsted ("BeerPlace"), Denmark

PostPosted: Wed Dec 10, 2008 1:00 pm    Post subject: Reply with quote

alex.blackbit wrote:
thanks for that bug link.
hopefully this issue is fixed soon.


You're welcome... ;)
_________________
-=[DrWilken]=-
ASUS AT5IONT-I (64bit Dual Core Atom D525 processor with Nvidia ION(2) GPU) running Gentoo Linux... Latest and Greatest... :)
tux-power.dk
Back to top
View user's profile Send private message
timeBandit
Bodhisattva
Bodhisattva


Joined: 31 Dec 2004
Posts: 2719
Location: here, there or in transit

PostPosted: Wed Dec 10, 2008 2:19 pm    Post subject: Reply with quote

Moved from Portage & Programming to Duplicate Threads.
See previous discussion and the bug report cited above.
_________________
Plants are pithy, brooks tend to babble--I'm content to lie between them.
Super-short f.g.o checklist: Search first, strip comments, mark solved, help others.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Duplicate Threads All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum