Public bug reported: Maybe this is a request for enhancement... but it works in Fedora, so I'm guessing it's intended to work in ubuntu 8^).
In Fedora, I can ssh into a remote host, issue 'systemctl restart sshd.service' (or in earlier versions, 'service sshd restart'), and the result is that sshd restarts - in particular, re-reading its config file. Not only that, but the ssh session I am logged in on is preserved. In ubuntu, the equivalent actions - 'service ssh restart', '/etc/init.d/ssh restart' and 'restart ssh' all fail with "error: Bind to port 22 on 0.0.0.0 failed: Address already in use." I guess that is because my current ssh session prevents the current instance of sshd shutting down. But somehow Fedora manages it... Steps to recreate: 1. ssh to remote server 2. sudo edit /etc/ssh/sshd_config, or other relevant file 3. sudo restart ssh Actual result: error: Bind to port 22 on 0.0.0.0 failed: Address already in use. (and sshd fails to restart) Expected result: sshd restarts (preferably with running ssh sessions intact, but even killing the running ssh sessions would be preferable to current state). The bottom line is that minor sshd reconfigurations on remote Fedora systems require only a restart of the sshd daemon. On ubuntu, they require a full reboot (which you may want to keep to a minimum on a remote system that you don't have physical access to). I realise that preserving the running ssh sessions over an sshd restart might be complex (and even undesirable, because it could lead to security issues with sessions still running with configurations that are intended to be fixed). But even having the sshd restart kill the connections of the current running sessions (so that it would be necessary to log in again) would be better than the current setup. Apologies if this has already been discussed - googling and ubuntu searches failed to turn it up. System: Description: Ubuntu 10.04.4 LTS Release: 10.04 Package: openssh-server: Installed: 1:5.3p1-3ubuntu7 Candidate: 1:5.3p1-3ubuntu7 Version table: *** 1:5.3p1-3ubuntu7 0 500 http://archive.ubuntu.com/ubuntu/ lucid-updates/main Packages 100 /var/lib/dpkg/status 1:5.3p1-3ubuntu3 0 500 http://archive.ubuntu.com/ubuntu/ lucid/main Packages ** Affects: openssh (Ubuntu) Importance: Undecided Status: New -- You received this bug notification because you are a member of Ubuntu Server Team, which is subscribed to openssh in Ubuntu. https://bugs.launchpad.net/bugs/1071264 Title: sshd cannot be remotely restarted from an ssh session To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/openssh/+bug/1071264/+subscriptions -- Ubuntu-server-bugs mailing list Ubuntu-server-bugs@lists.ubuntu.com Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-server-bugs