Why does Sudo not ask for SSH password?

Why does Sudo not ask for SSH password?

I’d like to setup sudo in such a way that it doesn’t prompt me for a password when I authenticate to sshd with a key; but do otherwise. I don’t want an answer of “it doesn’t work like that” because obviously that’s the reason why I asked the question in the first place.

Is it illegal to install Sudo in Ubuntu?

Check your distribution’s env file (/etc/environment in ubuntu) to make sure that it is formatted correctly (script commands are illegal in this file) If you are not root and you want to run a command with root prvileges then you must install sudo. But if you don’t have sudo and you are not root then you can’t install it.

How to run the sudo command in Ubuntu?

For example if your sudoers group is called sudo run usermod -aG sudo myuser. The sudoers group by default in Ubuntu based Linux is sudo. A sudoers group entry looks like this: %sudo ALL= (ALL:ALL) ALL

Which is the default sudo group in Ubuntu?

The sudoers group by default in Ubuntu based Linux is sudo. A sudoers group entry looks like this: %sudo ALL= (ALL:ALL) ALL If you are trying to impersonate another user and cannot install sudo, you can still use su if it is installed and you have permission / password for the other user.

Do you need a SSH key to create a password?

There is pros and cons in every approach, but a good place for inspiration is the commercial and free Shell account services. You can create a password for the user, then encrypt the password using the user’s ssh public key (which you already have), then send the user the encrypted password.

What is the purpose of a Sudo account?

The purpose of sudo is to give accounts that are logged in some separation between untrusted applications and admin-like tasks, and make users aware they are changing the system (and have to watch out). For desktops, both applies.

Is there a Sudo hack based on temporal SELinux?

Consider that for my personal servers I use Fedora, maybe there might be a hack with a temporal SELinux role based on authentication method, which can be then used in the sudoers file? It requires agent forwarding though, which I consider rather dangerous.

How to set the default timeout for SSH?

It is however possible to set the default timeout for a specific agent through the -t option of ssh-agent. -t life Set a default value for the maximum lifetime of identities added to the agent. The lifetime may be specified in seconds or in a time format specified in sshd_config (5).

How to add a non expiring SSH key?

If you want to add a non-expiring key, use \\ssh-add /path/to/key or ssh-add -t 0 /path/to/key. If ssh-add is being called from other program, see if they can be configured to take arguments.