Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Store correct session duration #62

Closed
nymous opened this issue Jun 26, 2018 · 1 comment
Closed

Store correct session duration #62

nymous opened this issue Jun 26, 2018 · 1 comment

Comments

@nymous
Copy link

nymous commented Jun 26, 2018

What happened:

When connecting to a host through sshportal, an entry is created in the sessions table. But all connections are shown as "Closed" immediately, and the stopped_at column is set to the same value as the created_at.

What you expected to happen:

sshportal saves the timestamp when the connection closes.

How to reproduce it (as minimally and precisely as possible):

  1. Setup sshportal with a user and a host
  2. Connect to the host
  3. In another terminal, run session ls in sshportal
  4. Session is marked as "Closed", with a 1s duration

Environment:

  • sshportal --version: sshportal version 1.8.0+dev ()
  • sshportal info:
debug mode (server): false
Hostname: bastion
CPUs: 4
Demo mode: false
DB Driver: mysql
DB Conn: REDACTED@tcp(localhost:3306)/sshportal?charset=utf8&parseTime=true&loc=Local
Bind Address: :2222
System Time: 2018-06-26T14:22:35.351678631Z
OS Type: linux
OS Architecture: amd64
Go routines: 2275
Go version (build): go1.8.3
Uptime: 1302h33m53.669240829s
User ID: 4
User email: REDACTED
Version: 1.8.0+dev
GIT SHA:
GIT Branch:
GIT Tag:
  • OS: CentOS 7.4.1708
  • install method: go
  • installed with a MySQL DB to store data
@moul
Copy link
Owner

moul commented Nov 18, 2018

fixed by #75

@moul moul closed this as completed Nov 18, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants