Automatically put "sudo" in front of a command in PuTTY

Advertisement

DaSilva
Joined:
Posts:
10
Location:
localhost

Automatically put "sudo" in front of a command in PuTTY

I have followed these steps to make my server a little bit more secure but it is annoying for me that I have to put a "sudo" in front of every single command in PuTTY that needs the specific rights. Isn't it possible to automatically add the command so that I don't have to do it manually?
Thanks in advance.

Reply with quote

Advertisement

DaSilva

PuTTY uses the same user and password like WinSCP uses (in my configuration). So it starts with a user that is not allowed to anything admin related without a "sudo" in front. So my question if it is possible to do that automatically.
An alternative would be to login as root with "su" and password but that is not that handy like the first option.

Reply with quote

martin
Site Admin
martin avatar

OK, no it is not possible. PuTTY is terminal. It means that it just receives characters, displays them and sends back characters that you type. It does not know what characters you type are part of command and what are not.

Reply with quote

Advertisement

You can post new topics in this forum