SystemD and Debian - fixing SSH sessions f****p on server's shutdown/reboot

in #linux8 years ago

And here goes my first "real" post on Steemit. Aimed on Linux users (mainly Debianers) :)

There is a problem with recent Debian's release (called "Jessie") which using systemd as init system - when you type "reboot" or "shutdown" in SSH session - your server isn't disconnecting you and you have to close terminal window/tab or wait until SSH "understands" that server goes down. But there is a way to fix it :)

You have to install PAM module which will "talk" with systemd:

apt-get install libpam-systemd

After that you should add one line to /etc/pam.d/common-session:

session optional pam_systemd.so

After reboot your server will disconnect you when you will try to reboot/shutdown it.

Coin Marketplace

STEEM 0.21
TRX 0.26
JST 0.040
BTC 101158.43
ETH 3649.74
USDT 1.00
SBD 3.20