Skip to content

linux can not remove session after client.Close()? #66

Open
@zrcshmily

Description

@zrcshmily

When I use goph to create a session, remotely execute the launcher command(start program), and then call client.Close(), the machine does not receive a Removed session message(localhost systemd-logind: Removed session 1169. /var/log/messages), what can cause this to happen?

client, err1 := goph.NewConn(&goph.Config{
User: "root",
Addr: ip,
Port: 22,
Auth: auth,
Timeout: goph.DefaultTimeout,
Callback: ssh.InsecureIgnoreHostKey(),
})
out, err2 := client.Run("sh /data/script/bgservctl.sh xx xx x")
in script
nohup $ROOT/server >/tmp/gserver.log 2>&1 &

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions