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

martin
Site Admin
martin avatar
Joined:
Posts:
27,226
Location:
Prague, Czechia

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

Sorry, I do not follow. How does the FAQ relate to PuTTY?
_________________
Martin Prikryl

Reply with quote

DaSilva
Joined:
Posts:
10
Location:
localhost

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
Joined:
Posts:
27,226
Location:
Prague, Czechia

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.
_________________
Martin Prikryl

Reply with quote

Advertisement

You can post new topics in this forum