Skip to content

cmd_exec: Trailing line feed in command terminates ssh session #20642

@bcoles

Description

@bcoles

Executing a command with a trailing new line (\n) using cmd_exec kills Linux ssh sessions.

The following will kill a SSH session (Reason: Died):

puts cmd_exec("id\n")

The same is not true for shell and Meterpreter sessions. The command is executed and the session survives.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    Status

    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions