2

I'm trying to figure out why msfconsole is exiting when started from with a detached screen, but not when started from a non detached screen.

Here are the steps:

screen -d -m -S msf
screen -S msf -p 0 -X stuff "msfconsole\n"
screen -R -S msf

msfconsole exits right after loading where:

screen -S msf
msfconsole  <-from within screen

allows it to actually run without exiting after loading. How do I fix this?

nKn
  • 5,832
Zack
  • 21

1 Answers1

0

I've found a solution that helped me .

A simple approach is to: ssh in to your metasploit box, run screen -dRR, and in the resulting shell run msfconsole. Then, in the future, if you disconnect your ssh client and reconnect, just run screen -dRR again and you'll be connected back w/your screen session running msfconsole. The screen -dRR command also creates a screen session if one does not exist, which is why it works even when there is no existing screen session.

just open an other ssh session or terminal then run screen -d or just screen -d if running a single screen.

Regards

Shen
  • 1