Re: Determining the key used to establish an SSH connection
From: smn (nospam@smnolde.com)Date: 10/28/02
- Next message: Ed Melendez: "Re: OpenSSH Password Aging/Expiration on UW2.1.3"
- Previous message: : "Re: logging"
- In reply to: Jean: "Determining the key used to establish an SSH connection"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
From: smn <nospam@smnolde.com> Date: Mon, 28 Oct 2002 20:44:51 GMT
Jean wrote:
> How can we determine which key (from $HOME/.ssh/authorized_keys) has been
> used to establish a particular SSH connection?
> At connection time the syslog facility for SSH just seems to log the login
> name and the remote IP address.
>
> The purpose would be to detect the usage of the same key from different IP
> addresses at the same time (which we would want to prohibit at our site).
>
> OpenSSH version is:
> OpenSSH_2.9p1, SSH protocols 1.5/2.0, OpenSSL 0x0090601f
>
> TIA
While DEBUG is too verbose, you can specify
LogLevel VERBOSE
and you'll see the key as well as some other info.
Set up syslog.conf to catch ths stuff to it's own file:
!sshd
*.* /var/log/sshd.log
Then create the logfile
# touch /var/log/sshd.log
HUP syslogd
# kill -HUP `ps ax|grep syslogd|awk '{print $1}'`
Oct 28 15:38:05 gw sshd[11527]: Accepted publickey for scott from
192.168.10.7 port 1278 ssh2
Oct 28 15:38:15 gw sshd[11531]: Connection from 192.168.10.7 port 1279
Oct 28 15:38:15 gw sshd[11531]: Enabling compatibility mode for protocol 2.0
Oct 28 15:38:15 gw sshd[11531]: Failed none for scott from 192.168.10.7
port 1279 ssh2
Oct 28 15:38:15 gw sshd[11531]: Found matching DSA key:
d4:66:c4:6a:6b:fb:d5:2a:d7:49:62:11:96:e0:c8:94
Oct 28 15:38:15 gw sshd[11531]: Found matching DSA key:
d4:66:c4:6a:6b:fb:d5:2a:d7:49:62:11:96:e0:c8:94
Oct 28 15:38:15 gw sshd[11531]: Accepted publickey for scott from
192.168.10.7 port 1279 ssh2
Oct 28 15:38:31 gw sshd[11533]: Connection closed by remote host.
Oct 28 15:38:31 gw sshd[11533]: Closing connection to 192.168.10.7
- smn
- Next message: Ed Melendez: "Re: OpenSSH Password Aging/Expiration on UW2.1.3"
- Previous message: : "Re: logging"
- In reply to: Jean: "Determining the key used to establish an SSH connection"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Relevant Pages
|