aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar alecdwm 2016-04-08 13:12:35 +0200
committerGravatar alecdwm 2016-04-08 13:12:35 +0200
commit1ad5682f0f0a73b330335970d984b8df32e7de37 (patch)
treead2df6b50c05e66747fa28a94db795b7658d71f9
parenta29b58e654c15faa4de4ae1195c0e6b8b3102395 (diff)
less anonymity
-rw-r--r--rsham.go8
1 files changed, 6 insertions, 2 deletions
diff --git a/rsham.go b/rsham.go
index 1ebd42c..126e584 100644
--- a/rsham.go
+++ b/rsham.go
@@ -121,7 +121,11 @@ func sshHandleConnection(nConn net.Conn, config *ssh.ServerConfig) {
ok = true
default:
- sshLog.Error("request type not implemented!", "type", req.Type)
+ if conn != nil {
+ sshLog.Error("request type not implemented!", "user", conn.User(), "RemoteAddr", nConn.RemoteAddr(), "type", req.Type)
+ } else {
+ sshLog.Error("request type not implemented!", "RemoteAddr", nConn.RemoteAddr(), "type", req.Type)
+ }
}
req.Reply(ok, nil)
@@ -138,7 +142,7 @@ func sshHandleConnection(nConn net.Conn, config *ssh.ServerConfig) {
if err != nil {
break read_loop
}
- sshLog.Info("Client sent command", "command", line)
+ sshLog.Info("Client sent command", "user", conn.User(), "RemoteAddr", nConn.RemoteAddr(), "command", line)
switch line {
case "exit":
term.Write([]byte("Goodbye.\r\n"))