Will "init 1" from a remote (via VPN) ssh session kill my ssh connection
Title says it all. but here is the scenario:
- Connected to work via VPN
- on a Linux client
- ssh [email protected]
-
init 1
Will going down to "single user mode" via "init 1" kill and disconnect my root ssh session?
Yes, yes it will. Most services don't run in runlevel 1.
It should be OK. Whilst the SSH listener daemon is stopped in runlevel 1 on most distros, existing connections should stay up, and networking shouldn't be affected. I wouldn't be doing it without having some sort of remote console connected, though -- you never know when a rogue solar flare is going to come along and drop your network connections for juuuuust long enough to kill your SSH session.
EDIT: Some testing indicates that, on Debian systems at least, /etc/rc1.d/S30killprocs
will take down existing SSH connections (because it's killing off everything). I would be inclined to knobble that script temporarily and do it's job by hand (avoiding the SSH connections) if I were to try to do what you want to do. I'd still prefer to use a remote console, though.