When there are multiple simultaneous SSH connections open, only the first two can sudo
. In the third connection, one gets asked for a password, altough the user doesn't have a password set.
First connection:
manuel@manuelthinkpad:~$ ssh manuel-nas-wan
Enter passphrase for key '/home/manuel/.ssh/manuel-thinkpad-arbeit.ed25519':
Linux manuel-nas 4.9.0-4-amd64 #1 SMP Debian 4.9.51-1 (2017-09-28) x86_64
The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.
Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
Last login: Tue Dec 5 13:59:52 2017 from xxx.xxx.xxx.xxx
user@manuel-nas:~$ sudo pwd
/home/user
Second connection:
(Equal to first connection)
Third connection:
manuel@manuelthinkpad:~$ ssh manuel-nas-wan
Enter passphrase for key '/home/manuel/.ssh/manuel-thinkpad-arbeit.ed25519':
Linux manuel-nas 4.9.0-4-amd64 #1 SMP Debian 4.9.51-1 (2017-09-28) x86_64
The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.
Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
Last login: Tue Dec 5 14:27:00 2017 from xxx.xxx.xxx.xxx
user@manuel-nas:~$ sudo pwd
[sudo] password for user:
Question
Can anyone tell me the reason, and how to deactivate this behavior? I want to be able to sudo
from all of my connections, not just the first two.
Thanks!
sudo
is your own, not root's. Root having or not having a password is irrelevant.visudo
tool. By the way you've to check the sshd configuration in your/etc/ssh/sshd_config
file for acknowledge if ssh permit root login or not.root
, thanks for the reminder.sudo visudo --check
emits:/etc/sudoers: parsed OK\n /etc/sudoers.d/README: parsed OK